Can I charge a Samsung Galaxy S9 with a MacBook Pro charger

Is it safe to charge the battery quickly or degrade the health of my battery? Just curious because the output of my MacBook charger is much faster so I want to know if it will affect the health of my phone's battery.