First big thing to check is to ensure that you have Qt6 installed on the computer you’re building from. I’m not sure if it’s necessarily required for the actual libretro core, but the rest of the repo can’t build without it.
Also you’ll want to make sure you’re setting the -DLIBRETRO = TRUE
flag in the command, or it’s going to just ignore the libretro folder entirely. Those were the two major stumbling blocks I ran into when I was building the core. Outside of that, you can private message me the actual errors you run into, and I can see if I can walk you through it. Keep in mind though that I taught myself how to build this myself in only about 5 hours, so I can probably really only help if you run into issues similar to the ones I ran into.
Alternatively, the GitHub release linked above has had no changes to the code at all, so you should just be able to use that built version if you can’t get the build process to work on your own.