About the former, I recently realized in practice that it’s important to pick up activities etc. that you like and that attract people you can bond with. For example I like weightlefting at gym, but I realized it attracts so many people with repulsive ideologies, while I tried dancing and mobility classes the same gym offers and the environment was much much better, I found many good people there. (I still do weightlifting though and I found some good people there too.)
Plus, voicing your opinions helps a lot to filter people (I’m struggling a lot with this though).