PKHaX makes use of the PKHeX project for Pokémon legality checking.
Run dotnet publish -c Release. The binary will be built to ./bin/Release/net10.0/publish/PKHaX
Example:
git clone https://github.com/PretendoNetwork/PKHaX
cd PKHaX
dotnet publish -c Release