While RB have invested heavily in their F1 infrastructure over the years, I think the team is now largely self-financing, and possibly even making a profit now it's winning constructors' championships again.
The current F1 budget cap (which RBR controversially breached slightly in 2021!) is around $140 million, although certain things like driver salaries and so on are excluded from that. So the team is probably costing $200-250 million a year to run.
However, F1 prize money and broadcast revenues are so high that most of this expenditure can be covered, a double championship win this year could be worth $160 million or even more.
https://www.totalsportal.com/f1/formula-one-prize-money/Add in $100million a year in sponsorship from Oracle and you can see how the books get balanced.
https://www.espn.com/f1/story/_/id/33253423/red-bull-name-tech-firm-oracle-title-sponsor-500m-dealRed Bull as a whole can't really just be thought of as a drinks producer any more. They have so many other business interests in technology, media and so on that they've become a multi-faceted global corporation in their own right. It's not as simple as 'do some marketing to sell more fizzy pop'.