In a battle, I would say that it's smarter to use your STAB move if none of your other moves are super effective on the opponent unless your STAB move is resisted by the opponent. If all your moves are resisted by your opponent, you should use your STAB move because it would get 1/1 damage instead if 0.5/1. The same applies for if all of your moves are effective or super effective.
If you are talking more about moveset, here is another answer:
You can have at least 1 STAB move for each of your types (if you have 2) and 2 or 3 STAB coverage moves to cover for your weaknesses or types that you will face often. You don't always have to run so many STAB moves because they are there to be kind of like your signature moves because they hit harder than your other moves. It's pretty important too to have good coverage moves because they counterplay your opponent.