Three-time European champions Spain advanced to the round of 16 at Euro 2024 after a 1-0 win against holders Italy on Thursday.