See the "Installing the required software" section from https://www.redhat.com/sysadmin/create-rpm-package to understand the directory structure.
Clone the repository
git clone https://github.com/FrostyX/rpmbuild-topdir.git ~/rpmbuild/
or
git clone [email protected]:FrostyX/rpmbuild-topdir.git ~/rpmbuild/