Yáñez joined Real Madrid's youth academy from Girona FC in 2010, aged 17. He made his senior debut in the 2012–13 season, playing 26 games for the C-team before was promoted to the reserves, in July 2013. After Pacheco's promotion to the main squad, Yáñez was an undisputed starter for the reserves in 2014–15, contributing with 30 appearances. On 5 August 2015 he was promoted to the first team and made his debut four days later, coming on as a late substitute for Kiko Casilla. In August 2017, Yáñez signed a four-year deal with Getafe CF, being immediately loaned to Cádiz CF for one year. Yáñez finally made his debut for Getafe on 17 December 2020 in a 2–1 win at CD Anaitasuna in the first round of the cup. On 15 July 2022, Yáñez terminated his contract with Getafe and signed a three-year deal with Málaga CF.