Your iPhone 17 Pro will fast-charge using your MacBook's 30W USB-C Power Adapter. The iPhone will come to no harm whatsoever when using a healthy high-wattage USB Power Source. Your iPhone will merely draw that power that it needs to optimally charge the iPhone's battery.
Battery Health is an inexact science, affected by many factors; while the iPhone will potentially charge faster with a 30W USB-C Power Adapter than a 20W, the battery's health will not degrade at an increased rate.
Your iPhone's battery health will be maximised by charging the battery frequently, avoiding complete discharge or deep cycling. Setting your iPhone to its optimised charging setting is recommended. Unless the iPhone is continuously connected to a USB Power Source for an extended period (i.e. many days), independent studies show that limiting charging to level lower than 100% is unlikely to make a measurable difference to the ultimate health of the battery over its operational lifetime.
Settings > Battery > Charging > Optimised Battery Charging - set to ON
Key to choosing a USB Power Adapter for Apple devices is choosing one that supports USB PD (Power Delivery). Apple devices do not support proprietary charging standards such as QC (Quick Charge). All Apple USB-C Power Adapters support USB PD.
For recent models of iPhone, a USB power source rated 20W or greater is recommended - although most models of iPhone will charge (albeit more slowly) from as little as 5W.