This is entirely anecdotal, and I don't have an expert's opinion on this, but I believe I was suffering from Vitamin D toxicity. I had been taking 5000 IU/125 mcg of Vitamin D3 daily for several years, and one day I started experiencing painful and distressing heart palpitations. They persisted on and off for months, until at one point near the beginning of quarantine I ran out of Vitamin D supplements. I went a few weeks before buying more, and during this time I didn't have any heart palpitations, though I hadn't really noticed until after I started taking Vitamin D again, at which point my heart palpitations restarted immediately. I stopped taking Vitamin D and haven't had any heart palpitations since (several months now). My working hypothesis is that the Vitamin D supplements were causing heightened blood calcium levels, which was messing with my heart.