Also, read through the documentation on Activity completion and Restrict access and Course completion
You will need a certificate plugin for example https://moodle.org/plugins/mod_customcert
Also, read through the documentation on Activity completion and Restrict access and Course completion