Selenium is more widespread but I recommend Playwright as the most modern automation library. Comes with plugins for making your automations more... nimble.
Selenium is the most popular tool in the industry but mostly for legacy reasons, its real competitor is Cypress. If you've just started a project I'd recommend checking it out, a huge time saver is that you install it as an npm package with a headless browser out the box without any webdriver/infra stuff slowing you down.