I highly recommend you move the objects, not the player.
Assuming the obstacles come from the right of the screen
1) Spawn obstacles off screen (right), set their X,Y and other values.
2) When the obstacles exits the screen on the left, change it's x,y etc and reposition off-screen right.
No need to create and destroy endless objects - reuse and reconfigure instead if possible.
I did this in my game Star Kite, that has endless levels too:
https://johnevelyn.itch.io/star-kite