This is a sample for beginner.
You can find what you need in this Infinity Run.
Game Manager - simple game states for controlling the whole game. Data Manager - sample of loading and saving game data with Scriptable Objects. Spawner and Destoryer - simple map spawner and destroyer.
All models were downloaded from Unity Assets Store for free.
You may try the game here: https://simmer.io/@parsue/infinity-run-sample