I had a similar situation on our original Gen1 ZS EV when that black foam popped out of the N/S/F door.
If you open the door really wide, you can see that it is used to bridge the gap between the front wing and the bodyshell.
I was able to reinstall mine myself.
I don’t think the burning smell is related to the foam issue though.
Is the burning smell only evident when you have the heater turned on by any chance ?.
If so, remember the cabin heater is more like the traditional electric fire you have in the home.
If the heater has not been used for a while, when you first turn it on, it sometimes produces the same as you get when dust settles on the the heater element of a home unit.
In a confined space like a car, you pick up on it straight away.
Others have noticed a similar condition in both models.
If you are corned by this situation, as the dealer to check it over for you.