First of all, hope you have a backup on an external drive. Operating systems installations should never be done without securing personal data.
What's the year/model of your Mac? See in Apple menu > About this Mac (give us all the information in the general tab).
Now take a look here If your Mac starts up to an Apple logo or progress bar - Apple Support
Also try some early steps that usually help a lot
Reset SMC How to reset the SMC of your Mac - Apple Support (only Intel Macs)
Reset NVRAM Reset NVRAM or PRAM on your Mac - Apple Support (only Intel Macs)
Restart holding Shift to enter Safe Mode. Once up, try to restart normally again (all Macs)
If not even the Safe Mode works, you'll have to reinstall macOS.
To do that, here's some main steps:
Use an external bootable drive, which you can create this way How to create a bootable installer for macOS - Apple Support
If you have another external HD, you can install macOS on it and then boot and try to recover data from the internal disk before reinstalling macOS on it.
Depending on your Mac model you might need this About Startup Security Utility - Apple Support in order to be able to boot from external drives.
You can also just install macOS over the old installation on your Mac. macOS is designed to preserve the original information on the disk, but there's always risk to lose data, so prefer the external HD method in case you don't have a backup.
Once you get you'r data back, now you can simply use the bootable installer to erase the disk and reinstall macOS.
How to erase an Intel-based Mac - Apple Support
How to reinstall macOS - Apple Support
In both procedures, skip the Command R step, this is replaced with the bootable installer, that'll get you to the Recovery Mode as well.