That’s what lots of sites used to do in the late 90s and early aughts in order to have fixed elements.
It was really shit. Browser navigation cues disappear, minor errors will fuck up the entire thing by navigating fixed element frames instead of contents, design flexibility disappears (even as consistent styling requires more efforts), frames don’t content-size so will clip and show scroll bars all over, debugging is absolute ass, …
And it increases resource use.
It’s not ideal, but t it does exist in pure html… and the OP didn’t seem to note it.
A bit of vanilla JavaScript with WebComponents is a few lines:
https://gomakethings.com/html-includes-with-web-components/
Edit: “t” was supposed to be the object tag.