A cable should be rated to carry at least as much power as you plan to use.
It shouldn't harm your equipment to use a 240W cable, but there's no advantage to using it instead of a 100W one when your power brick is rated to deliver 30W. My guess is that even if you had a power brick that offered 240W, the MacBook Air would limit its power draw to much less than 100W. (A 16" M3 Max MacBook Pro might be quite happy to use 140W of charging power, or more, given the chance.)
My understanding is that USB-C supports two kinds of power:
- Traditional 5V power. I read somewhere that all USB-C-compliant cables are supposed to support 5V @ 3A – or 15W – of this type of power.
- Negotiated Power Delivery power. This is the type that originally could go up to 100W (20V @ 5A), and now can go up to 240W (48V @ 5A). It supposedly requires cables that have embedded chips to let the devices to which they are attached know that they can handle more power.