Yeah, looks like it's Avast.OK, I can see the problem.
There are certain counters used to measure the effective clock and C0 residency. These need to be enabled to work, so if they are disabled, HWiNFO tries to enable them.
But in this case something is preventing enabling these counters.
For i5-12400 these counters were enabled by default (probably by BIOS), hence it works here.
But in the other case they are not enabled and HWiNFO is blocked from doing so.
Maybe it's the Avast..
FYI, I was contacted by Avast developers regarding this problem and I provided them details necessary to unblock access to those counters.