It's not easy, but there are a few things you can do. First, make sure your primary care provider is trustworthy and professional. If possible, pick one who isn't part of a major practice owned by private equity, though you'd have to ask the PCP and trust you're getting the right answer.
Second, whenever your PCP (or any other physician) wants to prescribe medication, testing, or procedure, ask lots of questions: is this the only option? Is there a different option with fewer risks, fewer side effects, and lower cost?
Ask any clinic if they charge any facility charges, and if so, how much those will be. If you don't like the answer, seek an alternative clinic (your PCP may be able to help identify good options).
In short, you have to ask as many questions as you can think of to get the best care at the most reasonable cost.