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 git@github.com:FrostyX/rpmbuild-topdir.git ~/rpmbuild/