How to add and remove a Tag in a plugin

Actually, this is not a duplicate topic as I’ve asked another question on “Flag” and this question is related to “Tag”. I’m trying to use the functions in developing a plugin.

As I’m developing a plugin and I have checked all possible resources, I didn’t find a relevant function that will help me add and remove a tag for the post.