It's said that the prayer isn't valid if it's too late. Should I still pray if it's too late ?
Islam/Allah isn't like hey you're 2 minutes late for returning your Salah and now your Salah is rejected. The merit of late actions are not like the merit of holding the ticket of a train station that has left the station.
It's the beauty of Islam that while everything has a certain time and must be done within that timeframe, still there is major forgiveness for any delay.
You've fought the prophet, and now want to be a Muslim? No problem. You're not disqualified for being late. Come join Islam.
You've sinned 20 years and now want to repent? As long as truly repent, then there's no problem.
As quoted from Quran below, surely being ahead of others is better. But even if you've joined late you're still ahead of many others.
...but [He intended] to test you in what He has given you; so race to [all that is] good. To Allah is your return all together, and He will [then] inform you concerning that over which you used to differ.
And the forerunners, the forerunners -
Islam is forgiving for late Zakat, Khums, prayer, Fitriyah and so much more.