How to save data in a buffer in Arduino

I need to acquire data every 20 milliseconds. I have synchronized two sensors and their output must be detected and saved on a txt file. To synchronize everything I used interrupts but once introduced micro SD I was not able to detect every 20 milliseconds but at maximum every 60 milliseconds, so I thought to save that data in a buffer and then save them on Micro SD. Can be a good idea?