In general, people just write games from scratch. With some engines, particularly Unity and the Asset Store, you can buy components of games, and they do sell full games, but I think they are rarely used. For example, you might buy the player controller assets, maybe art, particle effects (for fire, smoke, etc, all pre-made), AI scripts, etc. But for the most part it will be on you to combine those assets and scripts together to make a game.
On the Asset Store there are full games you can buy and try to replace the art or customize, but the ones I tried were badly coded and hard to modify. So that is not a good idea, even if available. And the games that do this are generally not good and don't sell well, particularly if players can recognize that the template was used in other games.
In Godot, there is not really a robust asset store, so you are kind of on your own. Some places, like Itch, have art for sale, like sprite sheets, etc. And this can help if you are not an artist. But it probably makes sense to do the code yourself. Or find some tutorials (in any engine) to get the idea of the logic, but make it custom your own way. Because your game will almost surely not sell if you just reskin a template you buy online.