How would I make a camea follow the player once they move off the center of the screen?

I’m building a simple 2D-platformer for my first game, and it was going well until I came across this problem. I want the camera to only start following the player once they move a certain amount away from the center of the screen and then re-center once the player stops. Please keep in mind that I’m new to programming.

You just have to simple move the camera in your player, move with. But for a real answer you need to make a script. ( can’t right it I am on my phone)