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...