Apple made similar announcements in 2017 and 2021
IIRC Apple said they would spend $350 billion over the next four years in 2017 when Trump's first term started, and that they would spend $430 billion in 2021 when Biden's first term started. What they actually spent, and how it was counted, who knows but that $500 billion is basically just continuing along the same path. Cook knows Apple won't be held to that number any more than China is going to be held to their supposed commitments for soybean purchases Trump announced. Trump wants the announcement, he doesn't care about follow through.
Somehow some people have conflated to that "Apple is spending $500 billion bringing their manufacturing to the US" or "spending $500 billion on AI" but neither are true. They aren't moving production of any iPhones or Macs to the US, and they certainly aren't spending anything like that much on AI.
Apple's AI spending is mere "dabbling" when compared what the ones hyping and benefiting from the AI bubble. They are building AI datacenters but nothing on the ridiculous scale that OpenAI, Meta etc. are. The mistake they made was committing to a particular date for having improved AI features in iOS, because when they had to announce they were pushing that back it put the idea "Apple is behind in AI" on Wall Street.
They should have said something like "we're taking a careful approach rather than throwing something over the wall and letting customers test it for us", since that's in reality what Apple always does. They are rarely first with a product or feature, they take their time and try to perfect (or at least improve) it instead of racing to claim "f1rst!" They would happily have a less capable AI if in exchange for that tradeoff that one that was less prone to hallucination and lying. Don't commit to a date, say "it'll ship when its ready and while we hope we'll have it by x that's a goal not a promise".