You really want to get pedantic? "Linux" isn't Ubuntu, nor is it Fedora nor Arch nor Debian or any of those distros. Linux is a kernel, and it supports several audio backends (or none at all). If we're comparing with Darwin/NT, neither of them "just work" with audio since none of them ship with it. If we're comparing OSes, then we're talking about Monterey vs Windows 11 vs Linux With The Latest Tech. Not Windows 10 just because more people use it. Not Monterey just because it was better.
That's a disadvantage for Linux in most respects since the new "solutions" for desktop Linux are pretty awful (Wayland, Flatpak, GTK4/Libadwaita, etc). Let it be known that desktop audio is not one of those issues anymore, though.
But today, if you download the most popular Linux distro from Canonical and install it on your PC, you are going to have audio issues out of the box. Saying anything else is gaslighting, and it is the main reason desktop Linux fails. People are told "it's good now, trust us!". So they install it, their headphones don't work, they roll their eyes and say "Linux gonna Linux" and go back to their previous OS.
Linux is not a desktop operating system. By default, it has no audio configuration. Distros package whatever software is considered "current" at the date of their LTS cutoff; Ubuntu is one of them. Ubuntu is using outdated software, and will be stuck that way for a couple years. Currently, Linux audio is fine. You're the one using broken software and blaming others.