Unixcop published a guide about installing mlocate on CentOS 8.
How to install mlocate on CentOS8
The locate command reads one or more databases prepared by updatedb and writes file names matching at least one of the patterns to standard output, one per line.
How to install mlocate on CentOS8 - Unix / Linux the admins Tutorials