My physician told me that under no circumstances should I be getting my vitamin D from the sun as skin cancer was not worth it; she instead recommended I get it from my diet.
Your physician is wrong, as separate from just the Vitamin-D mechanism, greater lifetime sun exposure is correlated with many net-positive health outcomes, especially with regard to cancer & cardiovascular health, that outweigh the risks of skin cancer.
Not necessarily. It's going to depend on your age, skin color and skin condition as to whether a pill beats sun.
But generally being outdoors, on a grey winters day in the northern hemisphere, with just your face exposed, and having darker skin, for an hour, is not going to get you enough D.
There is no evidence that moderate daily sun exposure increases mortality risk. Sunlight exposure also has other health benefits beyond vitamin D, such as stimulating nitric oxide production.