The first and second uses of the verb do are different.
The first do ("what does") is an auxiliary verb, which doesn't have meaning on its own, except to properly phrase a question. The auxiliary do is conjugated in the typical way:
What do I...
What do you...
What does he...
What did I...
The verb that follows the auxiliary do should be in the form of a bare infinitive, that is, the infinitive minus the to. The bare infinitive form of to do is do.
What does [auxiliary verb, conjugated in the present tense with the subject "he"] he do [bare infinitive of to do]?
As TaliesinMerlin points out, it may be helpful to think about this construction as a verb phrase. That term has multiple definitions, but here, we can think of a verb phrase just as multiple words which are used in combination as a verb. Some similar verb phrases with an auxiliary verb and a main verb are he can do and he should do.
When we use a verb phrase, only one component of the phrase is conjugated to match the subject:
I can go
You can go
He can go*
In this case, you can think of the verb phrase as he does do (an emphatic form of the statement he does), which is then inverted to form the interrogative form: he does do -> what does he do?
Other examples will follow the same pattern:
What does [auxiliary] she like [bare infinitive]?
Where did [auxiliary in the past tense] they go [bare infinitive]?
He does [auxiliary, here used for emphasis, not to form a question] think [bare infinitive]!
* This isn't the best example because can is irregular and is conjugated identically. If someone wants to edit this answer with a better example, they are welcome to do so.