Just like Parenting, the key is to show up and be there and provide the environment that you want people to experience. Most of the last is handled by having clear rules of behaviour and kicking the ones that wont follow them.
Enjoy the game, life is what you really want to be worried about.
PakKat "Everything was going well, until I died"
Gary Gravestink "I am glad you died, I needed the help"
Are you talking about guilds? Groups in PVE group content like Dungeons and Trials? Groups in PVP like Battlegrounds and Cyrodiil?
I am newish sorry I meant guilds lol!
Most good guilds have a "type" of content or socialization that they provide and they deliver on that regularly. They've got clear rules and expectations, and good organization that's provided by their officers. The people in that guild respect each other and enjoy what that guild is doing - they want to be there.
There are a lot of good guilds out there, but each player can only join 5. So I look for the guilds that fit how I want to play and give them a try. If they fit my playstyle, they have cool people, and they don't demand more than I'm willing to play or pay, I'm happy to stay in the same guild(s) for years.
Guildfinder might be a useful way for you to explore some guilds if you don't find what you are looking for here on the forums.