At stock bios settings the thermal output should be about the same as with the 2600, given both cpus have the same TPD of 65W. So if your cooler (assuming you are using the same or better cooler) was keeping the 2600 at lower temps, it also should have no problem with the 5600x.
Keeping that in mind the only logical causes for higher temps are:
- the cpu is drawing more than 65W for some reason (maybe the early bios support for the 5000 series cpus on b450 is not working properly. You could try undervolting)
- something went wrong when mounting the cooler (old thermal paste, not enough mounting pressure)
I am not an expert or professional at this subject, im just using common sense here. Hope it helps in some way tho.