I cannot post a comment so posting this as an “Answer”.
A simple search will lead you to dozens of questions about this in stackoverflow itself, one of which is the following.
Add category base to url in custom post type/taxonomy
Assuming you are trying to get the taxonomy term slug in the URL.