1. How can you know what you want to be?

2. First, think about what you want to do.
----------------
In each sentence, what is the part of speech of 'what'?
a) an interrogative pronoun
b) a relative pronoun containing the antecedent

3. How can you know the thing which you want to be?

4. First, think about the thing which you want to do.
---------------
Does #1 mean #3?
Does #2 mean #4?

In 1 and 2, 'what' is an interrogative pronoun introducing an indirect question.

Do not use 3 or 4. They are both very awkward.