To add a tag to a previous commit in a Git repository that you have cloned locally, you can follow these steps
tag
How to tag an older commit in GitLab repo using Gitlab pipeline
If you’re using GitLab to manage your git repositories, you can run this job to add a tag to older commit.