Napoli bought Osimkhen for the amount that amounted to just about 80 million, i.e. Formally, they did not earn anything on its sale. Plus, all these years, they paid him a large salary. The only thing I can’t understand is why Galatasarai made this transfer at all. Osimkhen would be a free agent in a year. Maybe they estimate his real value as 150 million and consider it a profitable transaction (expect to sell him in the future)? Otherwise, it is difficult to explain this record transfer for Turkish football.
If they didn't sign him and waited until he was free agent, Galatasaray wouldn't be the place he would go to probably.

Because in that situation there would be much bigger European teams going after him. Most likely from the place he wanted to be in too, the Premier League.
By the way Galatasaray can't sell him for even 80 million after a year. Because the Turkish league isn't prestigious. His value will drop quite much.
It's not about the prestige of the League, but about the performance of the player, for example, Győkeris made a name for himself at Sporting. I don't think that in terms of top leagues, the Turkish and Portuguese championships are very different.
As for Galatasaray not being able to sign Osimhen if he was already free, I thought about that too, but 80 million is a huge amount for Galatasaray, what is the end goal? Do they want to win the Champions League with Osimhen?

It seems to me that they are counting on getting their money back by selling him before the end of his contract.