If its under warranty bring it to Apple, if not more than likely if its completely fried, unfortunantly if your motherboard is fried due to a voltage issue your SSD is probably not salvageable due to the nature of how it stores information. Compared to a traditional HDD which stores your information as sectors on a magnetic platter, while an SSD stores your information randomly as bites on each individual chip - as a SSD runs as a chiplet with multiple chips storing your information, if the SSD has failed 100% that information is not salvageable without professional support through clean rooms, which require special equipment.
Because your computer is a macbook they all come with the newer M.2 MVME ssd’s (as far as I am aware) that run hot and have a relatively high failure rate if not cooled properly