Despite their current age Lionel Messi and Cristiano Ronaldo are still very important members of their respective national teams and doesn't look like they'll be quiting from international duties this year but since the next edition of the FIFA World Cup tournament is 3 years from now, I don't think we'll see any of them in the finals of the competition. Cristiano Ronaldo will be 41 years in 2026 while Lionel Messi will be 39.
Ronaldo I think might retire from international football after next summer's European championship with the Portuguese national team while his Argentine counterparts might as well retire after the next edition of the Copa America but we still might be lucky again to see the two football greats in the biggest football competition in 2026
Maybe we will continue to see both of them playing in their respective countries' national teams as long as the national team coach calls them.
In Portugal, there are players who are quite old but still in the Portugal national team squad, Pepe was almost 40 years old when the World Cup last year though he is reportedly still injured and Portugal is not short of young defenders who are just as good but he is in the Portugal squad list in this big tournament, especially for Ronaldo who is quite respected by many Portuguese players and is a role model for them.
Meanwhile, Messi, who is said to be younger than Ronaldo, will really depend on whether he is still willing to play for Argentina or not because he has stated several times that he will retire as an Argentine national team player.
However, without their presence, the World Cup will still be interesting because there will be other young players who can attract our attention.