That why I usually try to avoid matchmaking as much as possible, and stick to a smaller communities within the game.
For example, when I was spending some time few years ago in the WoW roleplay community, which was one of the most fun I ever had with that game, I've found out that if I do pugs with people from within it, be it just picking up people on the main realm's Discord or from one of the RP guilds I've met, I've never had issues with toxicity. Even if I eventually stopped RPing, I still have a friendlist full of people I know I can pug with without problems, or I can just hop onto the Discord again and pick up a pug there. Also - I've never had as much fun progressing through raids as when it was with a group full of hardcore RPers from our RP guild, who we've managed to convince to give raiding a try, even though they mostly just use WoW as a platform for playing DnD. Most of them weren't really good, it was slow and painful progress, but we still had a lot of fun.
And I have the same experience with Sea of Thieves, where I found a smaller local Discord server that used to host game nights, and it was also a nice experience. Sure, I had to make the effort to get to know the people, instead of relying on anonymous matchmaking - but that's what multiplayer should be about. And still, in general, even if I play with random people I don't know from within the smaller community, it's generally a lot better experience - because assholes and toxic people generally don't last long there.
And if I do play a MP game with random people, I just mute people at the first sign of toxicity, and just add them to my ignore list.