The fan spinning and your Mac can be charged means that your Mac isn't damaged. You can charge your Mac for about 15 - 30 minutes to check if the battery is lack of power so the MacBook Pro's fan is spinning but the computer is not booting up.
If charging your Mac for a long time changes nothing, you can try these workarounds to fix your MacBook that won't turn on:
Disconnect unnecessary external devices from your Mac
Maybe certain faulty peripherals cause your MacBook won't boot up. To verify if that is the case, you can disconnect all external devices to check if your Mac can start up.
Boot your MacBook in Safe Mode
Perhaps, certain login items block your Mac from booting up. You can boot your Mac into Safe Mode to disable all the startup items.
- Press the power button and meanwhile hold down the Shift key.
- Release the key until seeing the startup screen.
When in Safe Mode, go to the Apple menu > System Preferences > Users & Groups. Then, click on the Login Items tab, click the lock and enter the admin password to make changes, select the items on the list and click the remove button (-) below.
Run First Aid to check and repair the startup disk
- Boot your Mac in Recovery Mode.
- Click Disk Utility.
- Select the startup disk on the left sidebar in Disk Utility.
- Click First Aid > Run.
Then restart your MBP to check if it can boot up.
If First Aid can't help fix the startup disk and make the Mac bootable, reboot into macOS Recovery Mode. Then, click Reinstall macOS to follow the on-screen guide to reinstall macOS.
If your MacBook fan is running but the computer still shows a black screen, contact the Apple support team for assistance.