Who is the main villain of the first Avengers film? The answer is Loki.
Loki is the central villain of The Avengers, the 2012 film that first brings the MCU's major heroes together as a team. Thor's adoptive brother arrives on Earth after obtaining the Tesseract and makes a deal with the alien Chitauri, receiving an army in exchange for helping them access the Space Stone.
Loki's goal is to conquer Earth and rule its people as a godlike king. He uses the Tesseract to open a portal above Stark Tower in New York, allowing the Chitauri invasion to begin. He also uses his scepter to control people, including the scientist Erik Selvig and, temporarily, Clint Barton.
The Avengers eventually defeat Loki when Hulk overwhelms him and the team closes the portal. Thanos appears only in a mid-credits scene as the larger power behind the invasion, so he is not the film's main on-screen villain. Ultron is the antagonist of the later sequel Avengers: Age of Ultron, while the Red Skull belongs primarily to Captain America: The First Avenger.