What is a User-Agent?
A text string the browser sends with every request: the browser and version, the engine and the operating system. Sites use it to choose a page version and to log which browsers visit them.
Browsers now shorten it and move the details into Client Hints (the Sec-CH-UA headers and navigator.userAgentData), which a site has to ask for.