The best way to make sure a bicycle rim stops wobbling is through using a method called “truing” the wheel. This assumes that the wheel is bent from side to side, not “flat-spotted”.
Locate the bend in the rim.
Flip bike upside down.
Check the tension of the spokes at the bend. - If one side has no tension at all, it is time to replace the wheel. If there is tension, you can adjust the tension of the spokes to adjust the rim.
Use the spokes on the one side to pull the rim closer to straight and loosen the other side to allow the rim to be pulled.
Take care. Doing this is not so easy and it should be done with caution. The spoke tension should be nearly the same on both sides of the wheel after you finish.
Tighten the spokes. If the wheel has high or low spots, tighten the spokes on the high spot and loosen those on the low spot, usually opposite the high spot. But loosen the low spot spokes BEFORE tightening the high spot spokes.