It's a common problem that sometimes CPU makes loud noise with a strong smell. Generic fans and heatsinks are made as cheaply as possible to minimize costs. Small fans need to spin faster to move the air fast enough to cool the heatsink, the faster the fan spins, the more noise it produces. Fan blade design and case design can also make a big difference in how much noise the fan makes. In simple words, low down your GPU usage and make sure you never use the large application as they will produce more heat and smell too.
The larger the surface area of the heat sink the less airflow need to cool it (in general); so ideally you want a large heatsink with lots of fins and a large diameter, slow rpm fan, except not all cases have enough room for this.
Choose a case with good airflow, good quality CPU heatsink and fans, and the PC can be so quiet, the loudest sound is the HDD spinning up.