@giu23 Unfortunately, the only way of getting data off, is to have the device running, but since you’ve smelled something burning you should really!! unplug the charger (if you haven’t already).
What happened that could have made a smell of burnt electronics? Power surge, brownout, etc?
I have a 2021 16” M1 Pro, and it has been plugged in to the charger since December last year. Something must have happened in order for this to happen. If it’s something you didn’t cause, ie manufacturing defect, warranty should cover it. If it’s been exposed to liquid or has been damaged in any way, warranty is out the window.