Many insurers have rosters of meds they approve. Kaiser is one, just for a specific example. Everyone in the system is encouraged to prescribe from that list, even to the point of making clear medical trade-offs to do so.
This was all explained to me when we had to switch plans, ended up with Kaiser for a while, and needed to renew blood pressure meds for my wife.
She was in good control, no side effects, on meds for a decade. Those were not on the list. Rather than prescribe off list, that doctor increased her risk to benefit Kaiser, not her. And this was even made clear at the time! (maddening) Just to be ultra clear, it was that doctors "opinion" the various meds were all equivalent.
For a lot of reasons, none of which are medical, we went with it, and sure enough, she was not in good control, and had side effects.
Went back, got the meds that worked prescribed, (which cost me visit co-pays and some non trivial time and effort to basically demand the medication needed and proven) and found ourselves in the same "coupon" scenario above. Base cost of the medication was quite expensive, and a "coupon" was found to bring it roughly in line with the "on list" meds tried earlier. Of course, that all had to be done at another, outside pharmacy, due to the Kaiser one not carrying what they consider special order meds. That isn't a super big deal, but the whole mess involves bulk buying to gain price advantages, and the real worry point is cost being primary, with medical being secondary.
The whole thing caused me to very seriously question the strength of "medical opinion", given patient history, a routine request to simply continue proven treatment turned into a risk scenario for no reason other than the tangled mess of insurers, agreements, drug manufacturers, and the like all more focused on profit than they are patient health.
In my case, the pharmacy was Walgreens and yes they signed me up for some plan or other, GoodRX or the like, handed me a card and said I needed to use it to get the much better price. Was on the order of a few hundred dollars being discounted to a few tens of dollars...
Have had similar experiences at CVS, Bi-Mart, Safeway... Indie pharmacies, usually niche places that offer things like compounding, are particularly good at this sort of thing and it's one of the ways they attract and keep patients. I used a good one for years, until I moved. Miss those people. They would do that automatically for anyone struggling with med costs of any kind.