You will see how is it to be a parent when you have a child.
You will see when you have a child how is it to be a parent.
Is there any difference between these sentences? Are both correct?
What is the main clause?
I would choose a slight variation on the first one (just swapping “it” and “is”):
You will see how it is to be a parent when you have a child.
The main clause is “You will see <…>”, with the thing you are going to see being “how it is to be a parent”. The last clause “when you have a child” modifies the verb “see”, telling you when this will happen.
The second sentence would have the same meaning if you punctuate it slightly differently:
You will see, when you have a child, how it is to be a parent.
Without the commas, one could argue that the thing you are seeing is the point in time when you will have a child (you’re seeing the future!). That meaning breaks down pretty quickly, though, when you try to figure out what the last clause would mean in this context. In the end, the second sentence probably can only have the same meaning as the first, just phrased awkwardly.