First you have to realize that it's bad for your health. If you don't, give up at this point.
Then stop posting. Only send direct messages to friends if it's a social media that allows that. It helps using a social media app that can only send and receive messages. In my case WhatsApp and Telegram. A little bit of Messenger. At this point you realized that you're still alive and you still have all of your friends that you care about and viceversa.
Then stop reading. Only send and receive direct messages. Maybe respond to birthday messages the day after your birthday, eg on your Facebook timeline (if it's still called in that way.) If you want news about the world, check a couple of news sites or google for the news you want to know about.
At this point you only chat with friends that you reciprocally care about, in DM chats or groups. You can uninstall the apps you don't use to message.
You will still receive SM content that they share with you. Open them, maybe in the browser. Most of them open even if you are not logged in.
When you are with your friends you will notice that they spend time doomscrolling. Don't say anything, let them keep doing it. Eventually they might realize it's bad for them too or they won't.
In that respect, the worsening of social media has been a gift. I'm still online but with the attitude of: "Don't ever let yourself get attached to anything you are not willing to walk out on in 30 seconds flat if you feel the heat around the corner."