Web Components are a set of web platform APIs that allow developers to create reusable custom elements for their web pages and web applications. They use HTML, CSS, and JavaScript and leverage Custom Elements, the Shadow DOM, and HTML Templates.
Lit is a popular toolkit for building web components, although other options exist, too, like Svelte (yes! Svelte can be used to make web components, too!)