I don't think it's that we're more miserable these days but that we're miserable in different ways. Also, as others have said, because we're more open about it, at least online.
Life was much simpler in the past. That probably made people more easily satisfied, but it probably also made people more depressed if they didn't fit in or didn't adhere to the status quo. For many, there wasn't any expectation that you could do much more than work and raise a family. Of course that's depressing in a lot of ways - there must have been a lot of 'what's the point' type feelings, but also a lack of anxiety. People knew their place, for wont of a better term. That was both good and bad. Now, we're fed this idea that even if you grew up on a council estate on benefits, you can be successful and rich. Of course, it's very hard to achieve so people end up depressed and anxious. They believe it's their fault for not working hard enough. In the past, you were a farmer or a labourer or whatever, and you didn't expect much more. Like I said, that probably didn't feel great either, but in a different way.
There is a lack of community these days too. My family, for example, lived in the same place for generations, never travelled more than 100 miles from where they were born, knew all their neighbours and so on - great in a lot of ways, a sense of belonging, trust and so on. But if you everyone knew your business, everyone was judging all the time. My dad had an affair and somehow that ended up being my mum's fault - some people were saying because she was a slut (nothing could be further from the truth), some because she was a prude. So people could be extremely judgmental and everyone was in your business all the time. And when my MIL had a miscarriage, she blamed herself. I was the first person to ever tell her it wasn't her fault. She told me so many times it was because she worked too hard/took some medicine/got a shock - always a different reason but always somehow her fault. And everyone just agreed, yes, it probably was. That kind of stuff was prevealant.
I think a lot of today's feelings of misery comes from an overabundance of choice. We grew up very rurally - you bought your clothes from the two or three local shops, or you occasionally went to the nearest big city (three hours away) and bought stuff from the big chain shops. That was considered a big deal for us. If someone went to the US and brought back jeans or Disneyland stuff - that was mind-blowing. They were the talk of the town (or at least their class.) Stuff like Mac make up or Seven jeans were like some kind of holy grail for us, the epitome of glamour. Now, I can buy anything from anywhere and have it delivered within a week or I can travel to New York relatively cheaply and easily. Of course, that's great in a lot of ways but it also takes up a lot of time and thought. I can spend days looking for a pair of trousers, only to order them and find they're too short/long/tight/loose or very often the material is utter crap. Then you have to send them back, re-order and the whole thing starts again. Even 30 years ago, it was like you have a choice of this or that, done. Much simpler but also more boring probably.
Then, as well as material items, we have all of this constant information. The news - constant bad news coming at us 24/7. When coronavirus started, I was checking 20 or 30 or 100 times a day how many new cases there were. 30 years ago, it would have been once a day when you watched the evening news. That is terrible for mental health. When you're trying to figure out baby stuff - so many different sources telling you that if you do this, you'll mess your child up, then another source utterly contradicting that. If you play with them too much, they'll be clingy. If you don't play with them enough, they're neglected. In the past - you learnt from your mum or sisters or aunts, or read a book. Now you look online and it's like endless information.
These last two link into this idea of self-actualisation, which I think is also a source of misery. It can be great to be able to express yourself freely, obviously. But these days, many people use their possessions/status to do this - for women, often clothes, make up, how they raise their children, their homes, what their children wear. For men, it's often their job, technology, expensive hobby items. Travel too - my parents never travelled further than France. That was normal. Now, I have friends that openly express amazement that I've never travelled to Thailand, as if, well, you're the sort of person who goes to Thailand, so why haven't you?...I definitely find myself falling into this sometimes, feeling like if I wear a certain item, I will become a certain type of person. And it's lovely to be able to dress however you like but when it becomes too much a feature of your life, that can easily lead to depression/anxiety. We worry constantly about stuff, I think.
Exercise is a big thing too. It was very unusual to own two cars for one family in the past. People would walk to work or at least the bus station. Children walking or biking to school was normal, even if it was a few miles (I walked three miles from the age of six, and that was considered normal). It gave you exercise and time to chat if you were with family/friends. It built resilience too because we had no choice, even if it was raining, we walked, because we only had one car and my dad took it to work. At the same time, people maybe had less time for things like going to the gym/hobbies like cycling and stuff like that. But they were more active in their daily life.
Nowadays, if someone gets wasted and smacks their wife when they get home, we consider that person to be abusive and awful, and for the woman to be in a bad place - in the past, that was just accepted (such stories were even told as something humourous when I was growing up.)
But of course so many things are better now too - better rights for women, for gay people, for people of different races. But even then, I think there is a disconnect, because we tend to assume that people are less racist/sexist/whatever, but they really aren't in many ways, it's just more hidden now.
Of course all of these things have all existed to greater or lesser extents in the past, but I do think that these days we focus a lot on ourselves, how we appear and what we own, and it causes a lot of issues.