FIXED:
I'm not sure if this was what fixed the problem, but I did these steps and it worked:
Being in the error screen, open Terminal and type "nvram -c", restart the Hackintosh, and in the BIOS make sure that the date and time are correct. Start with macOS USB Recovery (Offline Installer) and format the disk to install (I use apfs because I have a ssd), start the installer and wait for the error to appear again, once it appears, restart with USB Recovery from macOS and redo the installation but WITHOUT FORMAT