Have git and stack installed on your system, with the route via ghcup being recommended for the latter.
Then:
git clone https://github.com/fmidue/prolog-graph-lib.git
cd prolog-graph-lib
stack build
stack exec prolog-graph -- --help
Also make sure you have Graphviz installed on your system.