Its not so much social media that ruined it, as capitalism and centralization.
Forums themselves are a form of social media, and they're (mostly) great. For Reddit and Lemmy, debatably the best part is the social elements, like the comments sections. The problem isn't the interaction or the "social" nature of it. Its that these platforms have turned into psudo-monopolies intent on controlling people and/or wringing them for every penny.
Thats not to say toxicity and capitalistic exploitation didn't exist before either. The term "flame war" is older than a lot of adults today. Unlike today though, platforms were both more decentralized meaning they were easier to manage and users could switch platform, and were less alorithmic meaning that users could more easily avoid large, bad-faith actors. You'll notice the Fediverse have both these qualities, which is part of why its done so well.
IMO, the best fix to this, would be twofold. A) break up the big monopolies and possibly the psudo-monopolies. Monopolies bad, simple enough. B) Much more difficult, but I believe that what content a site promotes, including algorithmically, should be regulated. Thats not to say sorting algorithms should be banned, but I think we need to regulate how they're used and implemented. For example, regulations could include things like requiring alternative algorithms be offered to users, banning "black box" algorithms, requiring the algorithns be publicly published, and/or banning algorithms that change based on an individual's engagement. Ideally, this would give the user more agency over their experience and would reduce the odds of ignorant users being pushed into cult-like rabbit-holes.