Hernández made his senior debut on 27 August 2017, starting and scoring his team's first in a 3–3 home draw against FC Cartagena. He finished the campaign as an undisputed starter, contributing with two goals in 33 matches.
Hernández scored his first professional goal on 7 January 2019, netting the opener in a 3–2 away win against CD Numancia in the Segunda División. Upon returning, he was assigned to Real Madrid's B-team in the third division.
On 28 September 2020, Hernández agreed to a four-year deal with CD Leganés in the second division.[6] On 19 August 2022, he was loaned to La Liga side Girona FC for the season.[7]
Hernández made his debut in the main category of Spanish football on 22 August 2022, playing the last 21 minutes in a 3–1 home win over Getafe CF. He scored his first goal in the division the following 17 February, netting his team's fourth in a 6–2 home routing of UD Almería.
On 5 July 2023, Hernández renewed his contract with Lega until 2026, and was loaned to Cádiz CF also in the top tier for one year.[8]