The proper way to ensure your rim is 'true', is to remove it from the bike and put it into a 'truing stand'. A truing stand allows you to precisely measure a rim's "lateral runout" (side-to-side wobbling) as well as "radial runout" (a.k.a. "hop" - this is where the outer circumference of the rim is uneven in its distance from the center of the hub). If the truing stand reveals any issues, you would likely need a 'spoke wrench' to appropriately tighten/loosen the pertinent spokes to correct the problem (you'll need to read-up on these techniques as well spoke tension and general wheel building ).
Since wheel truing is a fairly involved process that requires significant time, patience, knowledge, and some experience, it might be wise to first make sure you have definitely ruled-out an issue with the inner-tube or tire. Remove the tube and tire. Ensure that the wheel is clean and dry. Ensure that the inner-tube is clean and dry (lightly powder the tube if needed). To ensure that it's not twisted or kinked, inflate it just to the point that it holds its shape. Then carefully nest it into the tire and carefully put the tire onto the rim. The trick here is to ensure that there is no friction or encumbrances to the tube and tire taking an even/uniform shape as they're inflated to pressure.