What's the difference between the setting of the enlarger height and focusing the image? Aren't both of the dealing with the light that shines onto the baseboard?

You're right, both of them relate to the light that shines on the baseboard.

Raising the enlarger height increases the distance between the lens and the baseboard, hence increasing the size of the eventual image.

However, by raising the enlarger, the focus of the image will be off, resulting in a blurred image. Adjusting the focus will rectify the situation.

Usually the two operations are done in succession to get the exact desired enlargement while keeping the image in focus.