Apple has revenues of about $275bln, and a net margin of about 21% company-wide, meaning $58bln.
The app store sold about $50bln worth of stuff in 2019, Apple's 30% cut would therefore mean $15bln in revenue. If they operated the app store at a least a 70% margin (and really, if they didn't, then I'd be rather surprised), that would mean a good $10bln in net profit from the app store, or 17% of their total net profit.
And that's still not accounting for the network effect the app store creates, or the business intelligence.
It might not be the biggest elephant ever, but it's not what I'd call a tiny baby elephant either.
"no growth left in selling phones" is kind of the wrong way to look at it. Even if their number of units sold per year never grows, it's a very healthy revenue stream because they manage to convince existing customers to buy new hardware. Considering the cost per phone the revenue per customer is pretty high just from selling phones if they can get them to buy every 2-3 years.
Naturally, the 30% take from the app store is bigger, but that's a matter of overall volume, not growth. The app store is a cash cow and will remain so even if its numbers start trending down.
Apple and Google have a model where they make lots MORE money outside the system and if the price of software is ZERO they would be happy.
In Apple's case, even free software sells their phone.
In Google's case, even free software funnels users to their ad platform.
[1] "Smart companies try to commoditize their products’ complements."
1: https://www.joelonsoftware.com/2002/06/12/strategy-letter-v/
(joel's a smart guy, he should write more often)