How to add badges

Expand Badges from the Administration block and choose Add a new badge.

Enter the name and description for a new badge.

Upload an image. The file size should be less than 256KB.

Specify the Issuer Details.

Specify the Badge Expiry.

Click Create badge.

Choose the Criteria you wish to set for the badge.

https://docs.moodle.org/26/en/Using_badges

Manual issue by role

Select the role you wish to issue.

Select the option how you wish to issue the badge.

Course completion and Activity completion

The Completion Tracking must be enabled from the Administration block, Edit settings.

https://docs.moodle.org/26/en/Activity_completion

You need to enable access to award the badge to the users.