They are now just trying to get as much money as they can before retirement. It's not like they are playing for the fun of soccer, it is just money for them.
They could also stop playing and they would be earning more in ads. Pirlo and others are making a lot of money appearing in ads in Dubai for example.
All the players, in their last 2-3 years of the career try to amass as much as money as possible. It is their retirement package. In case of Messi, he has a deal with Inter-Miami and for Cristiano Ronaldo, the contract is with Al Nassr. Both of them are still taking part in world cup qualifiers at the moment, so we can't accuse them of ignoring the national duty. But 2026 World Cup is a long way off. I am not sure either of these two will be included in the national squads for that tournament (irrespective of whether they are interested or not).
@Sithara007 for now both Argentina and Portugal coaches have to include them in their squad because their citizens will revolt if these player’s say that they wanted to play but they were not allowed to play and I believe if they’re fit then sadly the coach will have no option but to add them to their World Cup squad.
@nullama now they’re only playing to increase their tally of goal’s because both have earned crazy money already and even when they will retire they’ll keep earning from sponsorship deal’s hence money is not the factor in their desire to play at the international level.