I don’t know how this happened, but I was able to assign header and footer to the templates again, and removed the non functioning ones from the templates
Despite I was able to proceed, I leave this open, as it might for your interest, that such state could arise
Do you remember if you had changed of theme when this happened?
It might be caused by this as changing from one theme to another will “remove” template parts (they are retrievable by reactivating the theme they were made with).
It seems it might have been caused by a change in theme, which is unfortunately a current Gutenberg FSE limitation.
I’ll be moving this to general for the time being.
Please feel free to reply to this thread if you come across this issue once again.