People often misunderstand how black holes work.
A star that has a certain amount of gravity, will have no more gravitation effect on objects if the star turns into a black hole.
Think of it like this. The closer you get to something, the more strongly you feel its attraction. If you stood on the surface of a star, you are really close to the matter under your feet, but still pretty far from the rest of the star. Because the star is spread out there is a peak gravity you can experience. Any part of the star you get close to, means you’re getting further away from other parts of the star.
But if you compress the star down to a point, like in a black hole, you can have the entire star just under your feet. You can be extremely close to every atom in the star, so you can feel its gravity much more strongly.
That difference only matters if you’re pretty close. Once you’re getting millions of miles away in a typical planetary orbit, whether the star is spread out or compressed down to a point, the gravity you feel is pretty much the same because the distance to the matter is pretty much the same.