Why did old websites make use of so many images as UI elements?

I've wondered this for a little while:

Why did old websites make use of so many images as UI elements? If you use the Wayback Machine to go back to some of the most popular websites in the past, you'll see that a lot of the UI elements were mostly images: buttons, headers, navigation menus, certain headings with custom fonts, etc.

Was it just easier to use images as UI elements back then instead of making them in CSS? Was CSS not as advanced or something back then? I'm a beginner developer hoping to do Full-stack development, so I'm not that knowledgeable with the history of web design, and couldn't really find anything online to help answer my weird question.