I recommend trying high-dose magnesium from magnesium chloride, it's easy to dissolve some (up to 15 grams at once) in some water and drink.
Mg orotate doesn't upset my tummy. Determined thru trial & error. I tried reading about the differences, but failed to understand.
Other forms bound to various amino acids like magnesium glycinate are good too, but you can also supplement those amino acids separately.
Magnesium chloride is water soluble so it's great to dissolve in your drinking water and drink throughout the day.
To know your Vitamin D shortage, take a look here: https://vitamind3-cholecalciferol.com/vitamin-d-deficiency-t...
Anecdotal: Around the time that I started my day job, I experienced light depressions during winters. For me it was just a winter-dip. I didn't think much of it but my then girlfriend (now wife) recognised that we got into fights much more often than during summers. She studied something along the lines of "Biology, Food and Health", and she thought I'd have a minor Vitamin D deficiency. I've started taking 75mg every day and after about 3 weeks I started seeing more vividly. I remember very well that when I walked out of the office during winter, even though it was near dark, I saw all colors much more bright and it was like a sort of pressure on my sight was gone.
Now, when I'm not in the sun during the day for at least 30-60 minutes (for maintenance in the garden, or working for clients during WFH in the garden), I take on avg 50mg (2000IU) every day and I've never had a dip anymore.
"Elemental Magnesium (Oxide, bisglycinate, glycerophosphate, malate, aspartate)"
Unclear what ratio of each of the above.
I think we should be more careful about saying this. I've heard both professors and doctors say this, and then I've personally read the (reputable, mainstream) research papers showing that double digit percentages of people have various vitamin deficiencies.
I'll just Google real quick to see if I can find some examples of common vitamin deficiencies, but these are obviously just web articles, not research papers...
https://ods.od.nih.gov/factsheets/Magnesium-HealthProfession...
"Dietary surveys of people in the United States consistently show that many people consume less than recommended amounts of magnesium"
https://pubmed.ncbi.nlm.nih.gov/10357726/
This one recommends 120mg of vitamin C, but I've seen another that recommends 200mg, and I suspect a lot of software engineers are not eating enough fruit on a daily basis to meet the recommended level.
Also, what's the harm in taking a multivitamin? At a cost of under $1/day, if you don't need the vitamins, it's a small cost (< 1% of Bay Area rent), and if you do need them it may have an impact on your health.
I agree that a multivitamin doesn't usually include enough magnesium or vitamin D, but that's an argument for adding additional supplements, not to stop taking multivitamins.
Unless we are talking about some high quality stuff like athletic greens.