For recording measurements at SD-the card needs a proper electrical interface, a proper file system and a controlled method of closing records. Do not use the card as an unlimited fast and indestructible storage.
CSV-the record may contain columns time, temperature, validity and serial number. After the disconnection test check which records have remained legible and how much of the latest data you may lose.
Power supply directly from GPIO is not an appropriate general solution. Current shocks in writing require a suitable supply path.
Select products according to the above criteria; the list is not a confirmation that they are all interchangeable.
Module for reading SD cards for Arduino Raspberry SPI
ESP32 38 pin WIFI IoT Bluetooth
ESP32-S3 N16R8 WiFi development panel BT 8MB PSRAM