What does Buddhism say about boredom? Very often when I meditate, or in everyday life, there are times when I get bored. I don't have to do anything. And often I go on YouTube to get busy.
It is the same in meditation, very quickly I get bored, I feel the time passing and it becomes heavy.

How do you manage all this?
Well, technically boredom is a form of tanha, craving. We crave for excitement, for fun, for an external source of energy. And according to principle of "this-that conditionality" craving is also a form of aversion -- meaning, when we are bored we have an inner conflict against "this". For some reason we think that "this", "here", "now" is not good enough.

My teacher explained, that every time we feel bored - that's really a signal from our inner mind that we have alienated. It's a reminder that we lost connection or integration. Because we lost connection, we feel something's missing.

From this perspective, every time we feel bored we should stop all activities, pause and look inside. Basically, meditation.

When we get more advanced on this path, we can learn to maintain this connection at all times, and then we don't feel boredom, we never have the sense of dissatisfaction, we learn to live in suchness more or less at all times.