I'm in my 40s and I have a TikTok account (case in point: see my other recent post), so I can speak to that.
TikTok and YouTube are a lot like TV in general, in that there's a flood of anti-intellectual trash, lowest-common-denominator clickbait, and other assorted dumb shit. But there's also lots of informative, high-quality content, if you put in the time to find it.
I've watched longform videos on YouTube that are as good as any documentary. One I especially like is Dan Olson's channel, Folding Ideas, which has some outstanding deep dives on crypto and the metaverse.
When you start using it, the TikTok algorithm is a chaos, and yes, it will show you a lot of absolute garbage. But if you stay with it a little while and swipe away from those videos, it pretty quickly homes in on what you like. My feed shows me science and nature videos, gardening, recipes, travel and finance, plus occasional political news and commentary.
I don't know if it diminishes your attention span or not, but like all social media, it's a great time-waster. Good if you're bored, not so much if you have important things to do. I try to limit myself to a few minutes a day, and alternate with activities that promote a longer attention span, like reading books.