Step 0: Make sure your chosen Pokemon isn't banned in a certain tier (Very obvious but I'm including this one from personal experience)
Step 1: Check to make sure the set is allowed in said tier. That is to say, moves like Double Team or Minimize are banned in most formats, so if you're using a gimmicky move like that, be sure to check the move ban list first.
Step 2: See if the particular combination of move and Pokemon are allowed. In some cases, you run into being unable to use a certain set due to constraints such as Event exclusive moves which can be used with some preconditions or with some certain moves and not others (for example, an newer event move which can not be used with another move tutor move from an older game or something like that)
Step 3: Look around for other Pokemon with better stats who can do the same thing, if applicable.
Step 3.5: See how necessary an item is for the set, and whether the Pokemon and item can be replaced with a prevolution with an Eviolite (very optional, but still something you want to be sure about).
Step 4: Make a list of common threats and counters in the tier. For example, a set which relies on Shadow Tag wouldn't be as effective in a Ghost Pokemon dominated meta.
This is the most important step. Make sure your Pokemon hits the appropriate benchmarks in speed and bulk to be able to pull off the set successfully. Spread your EVs around to ensure that your Pokemon can be effective against the most common sets (and some niche sets).
Then, if you're running an offensive set, see if you can beat the most common walls or sponges 1-v-1, or work out what preconditions you would need to fulfill to ensure you can be victorious in a particular match-up.
Step 5: Identify common offensive and defensive cores that can beat down your set and see if you can cover your weakness(es) with another Pokemon.
Step 6: Run lots of calculations on the damage calc, specially against the common switch-ins and threats. Again, have a rough idea of speed tiers and know the speed if your opponent is scarfed (RIP @ all mega alakazam that lost to Scarf Protean U-turn Greninja) so you're not caught off guard.
Step 7: Create back ups. If you're over reliant on any one set to deal damage or take damage, you might quickly lose if you lose this Pokemon that holds your team together. Keep a good balance, be it in offense and defense or physical and special offense/defense. That is to say, if you are running 5 defensive Pokemon and 1 offensive mon, you will lose the firepower needed to take down your opponent if you lose your one offensive mon, and are much more likely to lose. Same applies for teams that depend on one Pokemon to take hits. People take Regenerator or Recover for granted and end up overloading their only defensive Pokemon.
Step 8: Test, test, test! Use alternate accounts, and actually play as many battles as you can. This will give you the needed information of what sort of teams and sets you're likely to encounter, and what to do if you run into a surprise/gimmick/niche set.
Step 9: Adapt. I̶m̶p̶r̶o̶v̶i̶s̶e̶.̶ ̶O̶v̶e̶r̶c̶o̶m̶e̶.̶ Don't be afraid of changing moves, items, or even Pokemon if repeated tests show serious flaws. Pokemon isn't an exact science and sometimes your favourite mons and sets are just unviable in a format. Move on to other possibilities, because in the ends it's a game and games are supposed to be fun.
Good luck!