How to add Post Tags to a new element in header.php?

Use get_the_tags() instead of the_tags(), get_the_tags() does the following for you:

Returns an array of objects, one object for each tag assigned to the post.

with which you can work with to achieve what you want. See the examples on the codex page for more information.