Short answer: The legal situation in the early 90s made BSD unattractive right at the time where cheap microcomputers sufficient to host Unix-likes were proliferating, which allowed Linux to reach critical mass instead.

Too much detail answer:

In the 80s a lot of the commercial UNIX-likes were all or partly BSD derived, like DEC Ultrix, SunOS especially pre-Solaris, pieces of IBM/ISC's AIX, etc. and by the early 90s there were a bunch of BSD ports established or in progress for up-and-coming less expensive (..at least compared to minicomputers) workstations like HPBSD, SunOS, and the Tahoe system that fell through as the target for mainline 4.4BSD, and even commodity Microcomputers like 386BSD and BSD/386 once Intel offered a part with a usable MMU.

At this point _everyone and their dog_ derived their networking stack from BSD, because it was the reference OSI TCP/IP design and all the networking parts were permissively licensed. Even the Windows networking stack is BSD derived. That's still a thing, the Nintendo 3DS and Switch's in-house OS has a network stack that is derived from FreeBSD (though the rest of the OS isn't).

Then USL v. BSDi happened in 1992. https://en.wikipedia.org/wiki/UNIX_System_Laboratories,_Inc..... and made it unclear if the BSD platform was legally viable from 1992-1994.
The delays from that are essentially why Linux started and proliferated.

A few years later, MontaVista contributed a bunch of scalability work to Linux, and SGI and IBM who had recently bought Sequent contributed their even larger scaling and NUMA stuff to Linux as they bailed out of the Itanium Unix-brand-Unix Project Monterey (the later of which is what kicked off the SCO v. IBM lawsuit in 2003, but that was too late to kill inertia like the USL v. BSDi one did)... basically Linux got critical mass on features, vendor support, and hardware support by being in the right place at the right time and on relatively neutral ground relative to many long-standing divisions in the Unix world, and steamrolled the rest of the Unix market.

There was also a bunch of the common problem for permissively licensed stuff happening, in that the core folks got hired away by proprietary derivatives and choked the upstream. In the 80s a bunch of the core BSD folks left for Sun and built partially-incompatible partially-proprietary SunOS that was then superseded by the SVR4 based Solaris (SVR4 was _highly_ cross-pollinated with BSD, Xenix, and SunOS parts). Then a bunch of BSD folks spun BSDi to make commercial and partially proprietary releases (with squabbling about what would be proprietary), and the Jolitzes had a series of companies and... Then the Berkley CSRG that was the center of gravity for the BSD world closed up in 1995 (they had been winding down for years before that), and the post-4.4BSD community projects (FreeBSD, NetBSD, etc.) proliferated, with the usual open source squabbling keeping them not-very-unified.

As you note, the Next/Apple family has a lot of BSD code in it because the Mach folks at CMU derived most of their stack from BSD (and contributed back the BSD virtual memory system), and a lot of the people and code from that became the core of NeXTStep which became the core of OS X, and that lineage persists in nearly all of Apple's products and is occasionally re-synced with FreeBSD. You used to be able to get all the non-proprietary parts distributed as Darwin https://en.wikipedia.org/wiki/Darwin_(operating_system) , but Apple stopped doing that almost a decade ago and none of the forks have rooted.

There _are_ quite a number of other BSD derived proprietary OSes floating around that often don't go out of their way to note their relationship. The Sony Playstation 3/4/5 system software are hacked up FreeBSD derivatives. Juniper Junos that runs on a lot of fancy routers is FreeBSD derived (though recent releases have been migrating to Linux). Force10 (now part of Dell) and some Ericsson routers run NetBSD derived stacks. Etc.