Ronaldo having two and half years contract which is going to end in 2025 then most chances at the age of 40 he will retire from soccer but still stay in soccer because now he is brand ambassador of the Saudi League and Al Nassr soccer club, and they want him to stay until 2030 which is long time hopefully things will be good for them during this time.
Ronaldo has a few hidden clauses in his contract. He is guaranteed of additional payments if he stays in Saudi Arabia until the bidding for the 2030 FIFA World Cup gets finished. There is no guarantee that Saudi Arabia will be able to win the bid, but they believe that presence of Ronaldo is going to help them immensely. The Saudis actually want Ronaldo to forfeit his Portuguese citizenship in exchange for a Saudi passport, but from what I have heard his family is against the idea of settling down there on a permanent basis.