The great part about building your own PC is that you get complete control over which fans, coolers, and case you use. If you want to make a quiet PC you can go for a case that has good acoustics (read reviews that test acoustics), use fans that have lower dB ratings (but read reviews because the rated dB is often lower than reality), and choose coolers which use quiet fans while also delivering good cooling performance (again, read reviews for actual noise ratings and actual performance). When the system is hotter, it doesn't run slower unless it's way too hot and gets throttled. You should never experience that, so there's no possibility that excess heat ruins gaming performance.
Now, typically speaking when the CPU and GPU are stressed like when gaming at 4K they'll use more power, generate more heat, and the fans will spin faster to compensate. So it is going to be the case that the PC is louder while gaming versus idle and that's entirely due to the fans slowing down when the PC is idle (or under low load). I don't want to give a typical level, but generally speaking if you have a two fan GPU, two fans in the case, and the CPU fan(s) you would not expect to hear noise above 50-55dB at 1 meter away. This also means if your PC would be closer then it will be louder, but if it's under a desk it might seem quieter. If you use headphones they'll also insulate against some of that noise so it would also seem quieter. If you choose poor quality parts that favor CFM (airflow) over noise you can easily hit 60dB, which is a typical human voice for conversation.
IMO, I've not had a gaming experience ruined by noise caused by fans spinning faster due to gaming. TBH, my hard drives (8 bay external) make more noise than my PC.