Dear @Baimi, unless I'm mistaken, according to:
wikipedia.org/wiki/2022_FIFA_World_Cup_knockout_stage#Bracket
if Spain end up as Group E Runners-up, they will play Morocco.
But if Spain wins Group E, they will play Croatia; and then maybe Brazil in the Quarter-finals.