As you can see, I am a noob in MTG. I have been looking at the top standard decks in order to catch up some guidelines about the deck distribution (quantity of lands, spells and creatures; rares, uncommons and commons; types; colors; repetition of the same card). What I have seen the top of these competitive decks don't have to much card's variety, like having most of the time 3 o 4 cards of the same kind. So the question is: in order to be competitive, is it better not to have a variety of cards or is it easier to build a strategy when you decide to focus only on certain cards?
There are a lot of factors that need to be considered to make your deck competitive. I will address your concerns mainly in this answer though:
"is it better not to have a variety of cards"
Yes in most cases your deck should have a direct purpose (decking your opponent with discard or mill spells/ burn for direct damage/ Ramp for big creatures and so on). To do this you need to take into consideration the synergy between the cards. This means cards with the same effect or effects that compliment each other are majorly beneficial when creating a competitive deck. One example would be Pyromancer's Gauntlet in a burn deck then casting Lightning Bolt this is a synergy that gives you more direct damage to fire at your opponent.
"is it easier to build a strategy when you decide to focus only on certain cards?"
It has become a sort of rule of thumb for a lot of players to stick with a "playset" of each card they want in their decks. A Playset is 4 cards of the same name. The purpose behind this is that if you have a combo that you want to build the deck around, or even if you want to be able to have access to a certain card a lot of the time, you would need to have the highest percentage of drawing that card possible. Having four cards of the same name gives you a 1 in 15 chance of drawing that card (with a standard 60 card deck). This also suggests that it is most effective to stick to the smallest deck possible of 60 cards.
Overall it comes with practice and an understanding of the game after playing many games and seeing other decks, you will learn where synergies are possible. it may also be best for you to look on deck builder sites such as Tappedout.net. this will let you browse decks without jumping blindly into a game.