For me, it's familiarity. If I am familiar with the play style of a certain Pokemon, I can easily figure out which Pokemon make a good team with it. If I am not familiar with the Pokemon, then I go into trial and error to see what its play style is supposed to be. Once I have determined that, I can figure out which ones work well with it. Again, this takes trial and error. You're never gonna get anything right the first time around in this game. Aside from familiarity, you should also think about what role you want that Pokemon to have then try to see which ones fit it. For example, if I have a scarfed Jolteon, then it's supposed to sweep in the final turns of the battle but since it has scarf, it can only use one move and it's damage output is gonna be limited. So to complement this, I would find a Pokemon that hits really hard to weaken the as many Pokemon of the enemy team so that the Jolteon can finish them off in one shot
For checks and counters, the most obvious ones would the those that have a type advantage of the Pokemon in question. The hard counters would be those that does not care about said Pokemon's stab and any of its coverage moves. To determine this, it's important to scout out what coverage move one Pokemon has to see how much it counters you or if your Pokemon can deal with it without much help from teammates. For checks, the simplest ones to determine would be those that can kill you in one shot but at the same time, you can also kill it in one shot. Let's take the scarfed Jolteon who is just mindlessly spamming thunderbolts. Any ground type would be a hard counter since it does not care about electric moves and hidden power does not exist in gen 8. If it is in an earlier generation, then determine the hp type otherwise the ground type in question merely becomes a check as hidden power usually kills anything weak to it in two hits, maybe even one if it is four times weak to it
Here's a much more concrete example. Tyranitar completely counters Talonflame because what is Talonflame gonna do to Tyranitar? The best it can do is burn it with wisp but either way, Tyranitar will kill it. For a check, a good example would be Garchomp and Greninja. The frog scares the shark with ice beam but if it recklessly switches in on any of Garchomp's attack, it becomes a meal. Side note though, it should go without saying that the item a Pokemon holds could completely change it's checks and counters. Let's take the given example. While Greninja does scare Garchomp away, if Garchomp has scarf, then it's just gonna kill Greninja in one shot but if Greninja has its own scarf, Garchomp would be forced to run
Here's an important note. Since you're playing this on smogon rules, then familiarize yourself with the Pokemon on the tier. What they can do, what their play style is, what their potential moves are. Familiarizing yourself with the tier's Pokemons would also give you the chance to figure out which ones counter or check a specific Pokemon
Long story short, it takes trial and error as well as knowing what role a Pokemon is supposed to have. To determine it's checks and counters, it usually depends on what coverage move it's running
I probably have missed a few things here since I just said all this based on experience but that's my take on how to figure out which Pokemon make good teammates