Search Select and Add Categories or Tags with HTML, CSS and JS

I am working on a Project in which I am making a form where a user can search for categories/tags and select them. Just Similar to the way like we select tags in a youtube Video. Anyone could please help me how can I do this, I searched a lot but didn't find anything useful may be because I don't know the correct keyword to search. . You can look for Similar thing in Stackoverflow when we add tags to the question enter image description here