Born in Sarchí, Alajuela, Vargas came through the academy at Liga Deportiva Alajuelense and was promoted to the main squad by coach Óscar Ramírez on 30 May 2013, along with the other youth Ronald Matarrita and Steve Garita.[4] He made his first team debut in the 2013 Costa Rican Cup on 7 July, coming on as a late substitute in a 2–1 away loss against UCR; four days later he scored his first professional goal, netting his team's last in a 3–1 home win against the same opponent.[5]
Vargas was mainly a backup option during the following years, only making his league debut on 18 February 2015 by starting in a 2–1 home loss against Limón.[6] During the 2015–16 season, he only featured in five matches.
Herediano
Loan to Belén and transfer controversy
On 8 June 2016, Vargas signed a contract with Herediano, and was immediately loaned to Belén for the entire 2016–17 season.[7] In September, former side Alajuelense complained about his transfer to Herediano, after his federative rights were assigned to Jacó Rays [es] before his loan to Belén;[8] Alajuelense and Herediano only reached an agreement in June 2017, after Alajuelense was assured 50% of a transfer to any foreign club.[9]
In December 2016, Vargas went on a trial at Ascenso MX side Lobos BUAP,[10] but nothing came of it. He was an undisputed starter for Belén during the season, scoring four goals in 34 league appearances.
Breakthrough
In May 2017, Vargas returned to Herediano.[11] A backup option during the 2017 Apertura, he became a first-choice during the 2018 Clausura; his side finished second in both tournaments, losing both in the Finals.
Vargas became a regular starter for Tolima before suffering a knee injury in July 2019,[15] which kept him out for nearly three months. He left the club in December, after his loan expired.[16]
Millonarios
On 3 January 2020, Vargas joined Millonarios on loan for the year.[17] On 30 December, after being regularly used, he was bought outright and signed a permanent three-year contract with the club.[18]
Vargas has achieved great form playing for Millonarios and has been called the best defender playing in the Colombian league, with some tongue-in-cheek comparisons with Lionel Messi after an assist in a 4–1 win against Cortuluá.[19] Vargas played as Millionarios reached the final of the Copa Colombia in September 2022.[20]
In November 2022, Vargas was named to Costa Rica's squad for the 2022 FIFA World Cup.[23] He made his debut in the competition on 1 December, starting in a 4–2 loss to Germany where he scored the second goal for his country.[24]