A customized medication is prepared by a pharmacist (compounder) according to a doctor's specifications to meet an individual patient need. In other words, the Doc prescribes and the pharmacist/compounder prepares the meds.
https://www.lakesidepharmacy.ca/pharmacy-services/compounding
A physician, medical practitioner, doctor of medicine, or medical doctor practices medicine, and is concerned with maintaining or restoring human health through the study, diagnosis, and treatment of disease and injury. This is accomplished through a detailed knowledge of anatomy, physiology, diseases and treatment — the science of medicine — and its applied practice — the art or craft of medicine.
https://en.wikipedia.org/wiki/Physician#Education_and_training
Pharmacists are health professionals who practice the science of pharmacy. In their traditional role, pharmacists typically take a request for medicines from a prescribing health care provider in the form of a medical prescription and dispense the medication to the patient and counsel them on the proper use and adverse effects of that medication. In this role, pharmacists ensure the safe and effective use of medications.
https://en.wikipedia.org/wiki/Pharmacist
Incidentally, there is such a thing as a Doctorate in Pharmacy: A Doctor of Pharmacy is a doctorate first professional degree given to a person who has completed the highest level of academic study in the field of pharmacy.
https://en.wikipedia.org/wiki/Doctor_of_Pharmacy