I would like to create a space simulation with realistic gravity.

This means planets in 3d space which act as central gravity sources and multiple objects which are attracted by those planets gravity so that they orbit them in physically correct orbits (like in [Kerbal Space Program](https://kerbalspaceprogram.com), for example).

How can I implement such gravity sources with C# script?