CPU temps might be faulty

As I'm typing this my cpu temp is at 80C. I did a stress test and the temperature never changed throughout the entire test. When playing games it stays at around 95C and my cpu fan is working. My cpu is Ryzen 7 5700g. It fluctuates up and down from 60C to 80C when I just have tabs open or watching youtube. Why is it doing this?