Apple Mail still supports a combined Junk mailbox, but it’s now hidden by default. To show it, click the + button to add a favorite:
and then it will show up as All Junk like this:
For more information on what’s different on Sonoma and later, please see this page.