For some reason, the Fedora team decided to stop packaging Hardinfo in the repositories, so you’ll need to build it from sources as shown..
sudo dnf install glib-devel gtk+-devel zlib-devel libsoup-devel json-glib-devel gtk2-devel cmake
cd Downloads
git clone https://github.com/lpereira/hardinfo.git
cd hardinfo
mkdir build
cd build
cmake ..
make
sudo make install
Just had probs building this, but got it working eventually
You need to have a different package installed (Fedora 36 here) as referenced on this page - https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/thread/KWROF2KFNOX7BPN5LUS2DJINUMRMPJB7/
It's the gcc-c++ package that made all the difference for me. Hope it helps someone out.
Cheers
1vor