How to install pgcrypto?
contrib is correct, but you must have installed it for a different PostgreSQL than the one you are using.

Find out which packages are installed:

rpm -qa postgresql\*


Odds are that you need to run

dnf install postgresql11-contrib