First, it is generally a bad idea to manually install software in package based distro. It can break something in your system (providing install.sh script is quite uncommon, it means that developers can do something uncommon and unexpected). Even if everything will go fine, once after system update the program you installed will get broken dependencies and stop working. Better search for prebuilt RPM package.
Then, answering your question: to build against libraries you need to install corresponding -devel packages. In Fedora their names can differ from the library name (e. g. not libglvnd-devel, but glvnd-devel, you need to search them yourself). For wayland-scanner you need wayland-devel as you can find here or with command dnf provides ‘*/wayland-scanner’.