The European giants sought to make their mark in Group E with an unrelenting pursuit of goals against a Costa Rican side that posed no threat, taking the points with ease thanks to Olmo, Gavi, Marco Asensio, Carlos Soler, Alvaro Morata and a brace from Ferran Torres.
Spain were in control from the first kick, with Costa Rica dizzied by their early onslaught at the Al Thumama Stadium in Doha and unable to find any rhythm in a game where Pedri, Olmo, and Asensio dazzled.
Spain almost went ahead after five minutes, when Pedri’s deep cross from the left found Olmo in space, whose shot went wide of the post.
Asensio squandered a clear chance moments later, connecting awkwardly with the ball and sending it wide after being picked out by the pivotal Pedri, who had a role in seemingly every Spain attack.
They went ahead 11 minutes into the game when Gavi, who became Spain’s youngest-ever World Cup player at the age of 18, put the ball into the path of Olmo, who turned and deftly lifted it over the advancing keeper Keylor Navas.
Spain pressed hard for a second and got it on 21 minutes when Jordi Alba’s neat pass across the box found Asensio who fired low past Navas.
Spain searched eagerly for a third and won a penalty on 31 minutes when Oscar Duarte tripped Alba, with Ferran Torres coolly stroking the ball down the middle past the helpless Navas.
Spain returned from the break hungry for more, with Asensio firing over the bar as Olmo’s dangerous runs tested a Costa Rica defence that was all at sea.
Torres gave Spain a fourth and himself a brace on 53 minutes, finding Gavi on the right, who played it back into the area for the Barcelona forward to turn and fire home his second.
Gavi found the net himself in the 16 minutes from time with a sumptuous volley in off the post after from a floating cross from Alvaro Morata, then Carlos Soler and Morata completed the demolition with two goals in the dying minutes.