What should I do if the doctor gave me the wrong medications?

Call the office. Medical practices are among the most highly regulated businesses. The paperwork is enormous. What we are required to do for each person gets more complicated every year. Somebody drops the ball eventually. Realistically, you need to be part of your medical care. If you see that something is amiss, communicate it. A good office will learn from the problem.