If the temperature of Raspberry Pi goes above 80°C, you will see a little thermometer on your Raspbian desktop. This indicates your Pi is getting hot.
Its very important to keep your Pi cool if you are overclocking its CPU & GPU,
and also if its enclosed or is operating under heavy load.
To avoid rise in temperature and abruptly halting of your Pi, add a heat sink to your Raspberry Pi boards with a fan or at-least a fan to cool the Pi down.
Following is the connection diagram on how to connect a heatsink fan to your Pi:
You can measure the CPU temperature using following command in terminal:
vcgencmd measure_temp
or
/opt/vc/bin/vcgencmd measure_temp
Following screenshot displays the initial temperature of Pi without cooling fan & later readings of temperature after adding a cooling fan.
You can overclock your Raspberry Pi 4 B using following config in config.txt
Warning: This will increase the temperature of CPU.
I have tested it on my Raspberry Pi 4 and it increases the performance a bit.
over_voltage=4
arm_freq=2000
gpu_freq=620
Links you can refer for the Case + Fan i used:
https://www.amazon.in/Rpi-shop-Raspberry-heatsink-included/dp/B07V1RFFYT/ref=sr_1_1?dchild=1&keywords=Rpi+shop&qid=1585282622&sr=8-1
OR
Protect your Pi from dust using Raspberry Pi Cases:
https://www.amazon.com/s?k=Raspberry+pi+case
Cooling Fan for your Raspberry Pi:
https://www.amazon.com/s?k=small+cpu+cooling+fan+5v