It's a problem that many people on the forum complain about. It's mostly based on the size of your codebase (plus other assets), and which version of Unity you're using--newer versions have gotten much slower. Using the new DOTS stuff also increases it pretty dramatically (they say they are working on fixing this).
Changing a single line of code can take close to a minute on a medium to large sized game under a 2020.1.
Using something like Heaps where you can compile a large game like Northgard completely in 4 seconds is a completely different experience.