Meditate.
Thinking is the best antidote to boredom.
This form of metathinking can help you overcome your boredom, and learn about yourself and the world in the process.
Don’t replace boredom with work or fun or habits. Don’t pull out a screen at every idle moment. Boredom is the last privilege of a free mind.
Meditate.