Messi contract with PSG expires in 2023. However, the French still wants to extend his contract if Messi wants to.
On the other hand, Barcelona wants to see Messi return to Camp Nou but it's hard for the club to compete with the French team, PSG financially. Messi's contract with Paris Saint-Germain expires in six months. If the French club does not renew it, it will expire in June 2023, and he will be free to move elsewhere.
PSG is preparing a very attractive offer for Messi just for him to stay and play in France.
Messi's other option is to return to Barcelona. His former club was so disappointed by his leaving that they want him back. The issue is that they are unable to compete financially with PSG.
It is cleared that Messi is not prepared to move to a low class league anytime soon or perhaps never. He still has a lot of football in his boots.