The problem is that the social media companies have not been dealing with abusive posts of various sources. Governments can't take action against the bad posters are they are from another Government (and in some cases are employed by that government to cause trouble). Thus Governments have to take actions which they can control, unfortunately these actions will affect more than the bad abusers.
This should be made a problem for the social media companies (which it largely has, hence all the age verification fiasco), not absolutely everyone on the internet.
You assume your premise. No the government actually doesn't 'have to' take action about mean things on the internet. The UK has such an obsession with regulating what is, essentially, politeness.