Following the recent software update (details pictured), I've had issues with my S9 overheating whilst charging at night. I use an app called Sleep as Android which monitors sleep so I tend to keep my phone under my pillow on charge. It seems to reach 81-82% then becomes so hot that charging stops.
I have tried a few things, turning off Always on Display (as it didn't seem to turn off via the proximity sensor), disabling or uninstalling power hungry apps, removing the case, hard restart. None of these worked.
However I think I have now found a solution that I thought useful to share with anyone having the same issue. I turned off fast charging and for the first time since the update the phone charged to 100% under normal temperatures.
This is done via Settings 》Device Care》Battery》Settings.
Hope this helps someone!