Playwright and Puppeteer are both browser automation tools and libraries. They are both mature and contain all the necessary features for browser automation. There is no clear answer as to which library you should use. However, there are a few significant differences between both that might help you decide which one might suit you better.
Puppeteer
- Developed by Chrome Dev Team in 2017
- Puppeteer officially only supports Javascript. There is an unofficial port in Python but that's it.
- Fully supports Chromium along with experimental Firefox support
Playwright
- Developed by Microsoft and released in 2020
- Supports Golang, Python, Java, JavaScript, and C#
- Supports Chromium, Firefox, and WebKit
Playwright is more recent so there is a smaller community as compared to Puppeteer. Look at this NPM popularity graph to decide which one is more popular:
source: moiva.io
However, Playwright is feature complete and supports more browsers and programming languages. If you are okay with the smaller community then Playwright might be a good choice. Otherwise, Puppeteer is the way to go.