Walking around 2D planets?

So i have been trying to create a space game in which you walk around a planet… lots of people have done this but all the forum post about it have not worked for me, the closest i got was by using this and adding a character that can walk around however when you get to the edge of the planet you start moving outward into space… by pressing space i moved up and left/right moved me away/towards the sphere

can anyone help me?

Check this out
https://forum.unity3d.com/threads/2d-planets-gravity-not-yet-released.446184/