Need to do something to bring balance back to the dopamine level. Work, chores, cleaning, training, studying etc.
Starting to do something is the hard part, because dopamine works more like motivation whereas we previously misunderstood it as happiness or reward. That is why you see someone who has little time to play games enjoy it all the more.
We have sadly nuked ourselves constantly wanting more with everything instantly available that we feel down a lot (opposite reaction of dopamine) and those spells last longer and longer to balance it out again. Same reason tiktok, twitter, instagram, pictures and short videos ruin our happiness. We bombard it and thus increasing the time we need to reset and we are off balance. Our brain hasn't really changed much as humans, but we have unlimited access to dopamine at the tip of our hands. Drugs are widely available, fast food, sugar, porn, entertainment you name it. Look at video games.
So as stupid as it may sound, but having sweets, drinking a coke, smoking weed and browsing the gamepass library to see what game to play next to occupy your time will not make you happy. It does for a while, but living in a "utopia" does more psychological harm to us than one may think. There is a reason why many people with lots of money still work, why people in western countries are unhappy even though they seemingly have everything.
I am drifting off a little bit so TL;DR : Mostly when you are bored it is because you don't have balance from overnuking your brain with dopamine. Our brain needs the balance, because our brain is in stress mode when it is not in homeostatis. The stress mode is both triggered by having too much dopamine, but also afterwards when it does the opposite. So since dopamine also works as a motivator you will feel down and unmotivated to do something because you had too much of it before.
(Please not that I am not a brain expert and we as humans are very far away from understand the brain and how it works exactly. Things will change with new research and studies, but it is good to be aware of this and how it works. It hopefully will come help a few people out there when they start to look into this and figure it out for themselves how to best deal with it)