As you probably know, Ryzen 5 2400g has a thermal threshold of around 95C.
You have OCed to 3.9GHz equal to boost , Did you use Ryzen Master to OC?
You may require up to 1.475V MAX (for safe operation) on the Core to keep it stable however I would commence at 1.375V initially. If the system refuses to boot then increase core voltage in .02V steps till it boots.
It further complicates things as the GPU is incorporated into the CPU.
Any OC should be done within Bios (Third party OCers can corrupt your Bios)
Core voltage left on Auto can and very often provides overvoltage conditions to the CPU and results in overheating.
The wraith cooler provided with your CPU will cope at stock and a slight Overclock however you need to keep core voltage to a minimum whilst remaining stable. Also using offsets,SOC voltage, LLC to help maintain stability.
You should read up on some Overclocking guides if you lack in experience.
Here is a good article from guru3d:
https://www.guru3d.com/articles-pages/amd-ryzen-5-2400g-review,34.html