They have some leverage over his party politically or him as a candidate, but as a sitting president (especially one as unhinged as he is), his power is absurd.
Apple and Googles revenue combine to around 3% of US GDP (substantial!), but it’s not like they would threaten to take that elsewhere or stop selling in the US or something. The ways they can “hurt” Trump hurt them and the rest of the country also. But Trump can do targeted damage to them across many avenues with a stroke of the pen (or even a Tweet)