How do you implement all the things the game engine gives you for free? Physics, camera, scene management, lighting, colliders, shaders, navmesh, etc. It seems like an impossible feat to implement all this yourself PLUS build a game on top. Wouldn't just building the game itself be a 2000-20,000 hour project? And I imagine building the game engine would be an order of magnitude more complex, if not more time
It's a lot of work, but there are a lot of tutorials and readymade libraries out there to get you started (which you may end up ripping out if the project grows sufficiently that it's worth doing custom stuff, but most projects never get to that point). It's definitely nowhere near as difficult as it seems like it would be to get a basic game up and running (though it's still very hard)--you're not going to come close to competing with something like UE5, but if you're doing a game from scratch that probably isn't your goal in the first place.
For FOSS in particular, it helps that people are willing to devote massive amounts of free time to programming when the outcome is a video game--it's why a lot of people got into computer science in the first place, after all.