I'm a bit late to the party, but I've been making my own game engine for about 3 years now, and here are my few cents on whether or not to roll your own game engine, how to do that, and what a game engine even means:
https://lisyarus.github.io/blog/programming/2023/09/15/so-you-want-to-make-a-game-engine.html