A friend has familial hypercholesterolemia - cholesterol levels were around 1000 as a child, on statins since like, age 10.
At their request, the doctor dialed back the statin dose and cholesterol levels shot back up within days - even on a vegetarian diet with plenty of exercise.
They asked if they could start eating egg yolks again and the doctor said something like, "Go ahead. Your diet does not affect this condition at all."
Familial hypercholesterolemia isn't the same thing as having a 300 cholesterol level because you eat McDonald's. Listen to your doctor - they do know some things.