I definitely don’t recommend true infinite loops (one because the engine will be angry) but two because every recursive loop needs a break case, be it physical (tile only spawning the next tile once the player is on it a la subway surfer), or some other stimuli.
Basically, you can of course just continue spawning them and turn it off whenever, but you also need to think about other mechanics, like if your character has to slow down or speed up, then you need to be able to influence the rate at which the tiles spawn. For the test I set up to show you that I didn’t finish yet, I’ve got them stretched out, and a collider at the front to know the player has landed and to spawn the next tile. This way no matter what, the tile will only spawn the next one when it’s needed. Should cut down on extra processing you’d need to keep a handful up.
I was also going to recommend you stretch the tiles out large like subway surfer’s scenes but you’re way ahead of that.