Well, the math is pretty simple, coincidentally I just made something like this yesterday.
Force = (mass of first body * mass of second body) / distance^2
Then just apply the force into the direction of a body you want to orbit around.
Here is the outcome:
https://youtube.com/watch?v=gjh1R1kYWf0
Is your problem just the world size or also that the moon can’t move, since there are players on?
In case it is just the world size, then consider scaling everything down and therefore convert units from cm to m for example. Depending on your game, that still leaves enough floating point precision and increases the size of your map by a factor of 100.