I dont see how gambling and doom scrolling are related.
Things don't have to be directly related for one to be able to make a comparison between them.
It's obvious that engaging in these two activities in excess is unhealthy, but answering the question about which one is worse is not an easy task. On one hand, you can lose money in slots, a lot of money if you develop an addiction, which doesn't happen with social media. But while you scroll, the platform learns from you, and you also get manipulated by the platform, which doesn't happen if you gamble.
So, I think that although the downside of gambling is clear, the dangers of infinite scrolling are more subtle, but also deeper, and we don't know yet the future impact it can have in our society and in our lives.
You lose money also from social media and doom scrolling. The process by which this happens is very subtle, and when compared to some direct form of losing money such as is the case with gambling it can be misleading. You make 2 mistakes in your post:
1) Social media platforms don't just learn from you, they manipulate you to do things. They make you buy things and you will believe that the decision was yours, but it was not.

2) Gambling platforms do regularly manipulate you. Most of gambling games are designed in a way that maximizes playing, that is the manipulation.