Hey there,
Can you list your PC specs in full including case, fans, CPU/GPU/RAM/Mobo/PSU.
Your idle temps seem quite high. What is your ambient temp? Where you live is it hot right now? Typically, if your ambient temp is say 20c, then your CPU will run at about 10-15c higher. So in this case about 30-35c. If your ambient temp is higher that 20c, then so will your idle be above 35c.
In terms of undervolting there are a number of options. Using Curve Optimizer in the bios, or a software option through Ryzen Master, CTR 2.1, Project Hydra,
Read/watch lots of resources like this:
https://forums.flightsimulator.com/t/ryzen-7-5800x3d-undervolt-guide/574169
Look for a guide that has your mobo. Make sure you know what this entails, and how the process works.
And don't forget to test, test and test again for stability
You don't want the CPU crashing for any reason.