How to get started with designing a user interface: build components or pages?

It seems a UI designer starts by making a bunch of components a developer can put together like a jigsaw to create pages. Once the components have all been designed, the UI designer can move on to a prototype of a whole page.

How can you create a bunch of components when you have no idea of what the page will look like? Who would even want a bunch of components / a "UI kit" when they have no idea of how a page would look?