Since Android is an open source operating system, anybody can check and modify it's source code. You yourself can modify it as per your liking if you know what you are doing. Custom ROMs are the product of the openness of Android. If you have noticed, when you use a Samsung phone it feels different than a phone from Xaomi which is also one of the blessings of an open software.
Custom ROMs are the modified versions of the original Android operating system that can be installed in place of the Stock ROMs ( The OS that's already present on your device when you bought it. ) . Custom ROMs can be very beneficial if your phone supports it.
If your manufacturer stopped sending software updates for your phone then you can get the latest version of android if you install a custom ROMs on it. And since it will be how android was originally made you won't get bloatware and ads on your system apps that you normally see on generally every Stock ROM.
There are many Custom ROMs that you can choose from. Each of them are unique in their own ways. They differ from features, battery life, performance, etc.
Most Custom ROMs have Google services scraped out from them, that alone is the biggest feature for a privacy-centric device. They come preinstalled with open source alternatives of the propitiatory apps that can get your job done. Some ROMs even give their own services for cloud storage, emails etc. making them more privacy focused. You generally get the fastest security updates making your phone less vulnerable to malwares and bugs.
Different ROMs use different kernels ( The part of an operating that is directly connected to the hardware and is responsible for controlling it ). Kernel is heavily responsible for the experience you get from your device.
Many Custom ROMs offer you improved performance - definitely better than the Stock ROM that your manufacturer offers you. It is due to the fact that all the bloat are removed , latest version of android is present and the processor is overclocked.
Since all the bloat and ads are removed the background processes on your device gets substantially reduced that adds up extra life to your device. And you can even under-clock your processor that helps a lot to gain more battery life.
Depending upon the Custom ROMs you get different levels of customization as well as you get a unique looking UI which you cannot get on any Stock ROM. You can entirely hide the icons on status bar, change the boot animation, apply system wide themes, the possibilities are endless.
Your ROM might not have widewine L1 support making you unable to view HD content on applications like Netflix, Amazon Prime, etc. You will have to root and do the modifications or wait for a software update that enables it.
Your ROM may fail to verify SafetyNet, not being able to install certain apps especially banking apps if you use them frequently. This also can be fixed by rooting and doing the modifications.
MediaTek in terms of Source Code has a policy, of not distributing it for free just to anyone unlike Snapdragon and Exynos processors. So there cannot be Custom ROMs designed for MediaTek unless they clarify themselves as opensource, or someone buys the source code from them and gives it to the developers.
Generally the camera apps of Custom ROMs are poor in terms of software optimizations and versatility. This issue can be fixed by installing Gcam ( Which might even have better software optimization than your Custom ROM offered. ). You also have the ability to install ANX Camera ( MIUI Camera for Xaomi Devices ) but it require you to flash files from a custom recovery or via Magisk after rooting.
Some Custom ROMs require you to have root access to work that can add a big vulnerability to your device since it opens up your system directories that might cause all your data to be leaked if a malicious app got access to it. This can be prevented by your efforts of not letting any malicious apps to get into your device and access root level permissions.
Installing a Custom ROM require you to to unlock your device's boot-loader. The method and process of unlocking the boot-loader completely depends upon the manufacturer ( Some doesn't even give you the ability to do so. ). You might also need to install a custom recovery for the installation. If not done with proper care and knowledge you might brick your device during the process.