Im using Arch in Wsl2 and I'm getting the same error (installing with yay -S chromium):
❯ chromium [3335:3335:1025/005623.218894:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY [3335:3335:1025/005623.219001:ERROR:env.cc(258)] The platform failed to initialize. Exiting.
I found this --ozone-platform param that It permit me to open chromium. And my $DISPLAY = :0
chromium --ozone-platform=wayland
https://github.com/puppeteer/puppeteer/issues/8148#issuecomment-2436771650
If u having the same error yet try to change the param: chromium --ozone-platform=headless
chromium --ozone-platform=wayland
chromium --ozone-platform=x11