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
I suggest including the package cmake in the dnf command, otherwise it will not be installed.