Learn the concepts first, and pick Playwright as the vehicle.
Selenium is not legacy — it is everywhere in existing enterprise suites, and there is real, well-paid work maintaining those. But as a first tool it teaches you to fight the browser: explicit waits, stale element exceptions, and driver management are Selenium problems, not testing problems.
Playwright gives you auto-waiting, tracing, and parallelism out of the box, so you spend your learning time on what to test and why — which is the part that transfers.
Once you are comfortable, Selenium takes about a week to pick up, because by then you already understand locators and the page object pattern.