Right, but the macro environment (S&P 500) is different from the micro environment (AAPL). Apple can charge 25% more because their customer base is largely the economic winners, the ~10% of people in professional jobs who have seen their compensation go up by 15-20% rather than 4%. And an iPhone is a small portion of their total expenses, so as long as Apple is continuing to add value, they can cannibalize spending that might otherwise go to meals out, or trips, or paying hourly workers more rather than raising software engineer salaries.
Or for them to charge the same but grow revenue, that implies they ship more iPhones. This again implies a shift in spending from other goods to iPhones, which comes out of some other firm's revenues.
The macro environment doesn't work like that. Every dollar that someone spends on iPhone is something they don't spend on Coke, or snack foods, or Home Depot. When you aggregate across all firms, you have very few free variables. If everybody is raising their prices, that's inflation, which we saw a lot of before but the stats now say that it's coming down. If they're shipping more product in total, that's an increase in output (real GDP). Within all the total revenues that all companies take in, some goes to other firms (payments), some goes to labor (wages), some goes to land (rents), some goes to the government (taxes), some goes to debt holders (interest), and some goes to equity holders (profits), and the sum of all of these has to equal the total revenues.
The past ~20 years has seen marked declines in the share of income that goes to labor (real wages), the share going to the government (taxes), and the share going to debt holders (interest), with rents remaining roughly constant nationwide (but skyrocketing in certain municipalities like the Bay Area) and the balance of the gains largely going to profits. It looks like the macro environment has changed within the last year so that labor has more bargaining power, the government is ceasing several stimulus payments and may be raising taxes, and interest rates are going way up. Those will all increase the share of national income going to labor, government, and debt holders significantly, and so the balance has to come from landlords or equities. There's currently a tug-of-war going on for who's going to be the bagholder, will it be real estate or stock owners, and that hasn't fully played out. But if current trends continue it's going to be one of them, and yet this hasn't been priced into the price of those assets.
Ironically, all of the forces behind this are wildly politically popular, which is perhaps why they're starting to get traction. People want to get paid more, and see their fellow workers get paid more. People want the government to collect more taxes from corporations and rich people. People want their savings account to earn more. They just haven't made the connection that the other side of the trade is their 401(k) and brokerage account.