Have it orbit very close to a massive body
What you want is a very small Hill sphere, which is the region of space where a particular body's gravitational influence dominates. On the other hand, the celestial body probably will have to become a moon.
If the mass of the smaller body (e.g. Earth) is ${\displaystyle}$ m, and it orbits a heavier body (e.g. Sun) of mass ${\displaystyle M}$ with a semi-major axis ${\displaystyle a}$ and an eccentricity of ${\displaystyle e}$, then the radius ${\displaystyle r_{\mathrm {H} }} $ of the Hill sphere of the smaller body (e.g. Earth) calculated at pericenter is, approximately
${\displaystyle r_{\mathrm {H} }\approx a(1-e){\sqrt[{3}]{\frac {m}{3M}}}.} $
The above equation means if a satellite orbits a more massive body, it will have a smaller Hill sphere even if the satellite orbit stays the same. There is a limit on how close bodies can orbit each other however. Its called the Roche limit, and objects closer than this limit gets ripped apart by tidal forces.
The Roche limit for a rigid spherical satellite is the distance, ${\displaystyle d}$, from the primary at which the gravitational force on a test mass at the surface of the object is exactly equal to the tidal force pulling the mass away from the object:
...
${\displaystyle d=R_{m}\left(2{\frac {M}{m}}\right)^{\frac {1}{3}}}$
where ${\displaystyle R_{m}}$ is the radius of the secondary, ${\displaystyle M}$ is the mass of the primary, and ${\displaystyle m}$ is the mass of the secondary.
(edited for formatting clarity)
So put your planet-like moon close to the parent body and make the parent body big. That might cause a host of other problems though depending on your story such as massive amounts of radiation, high delta-v cost to get to and from the planet, etc, depending on the details.