I understand that the fitan have increased too much and the era of Imam Mahdi (AS) is approaching but what will happen then? I have dreamt of becoming a great scientist, and I am working hard for that. So does that mean my hard work will go in vain?
Anas ibn Malik reported: The Messenger of Allah, peace and blessings be upon him, said, “If the Resurrection were established upon one of you while he has in his hand a sapling, then let him plant it.”
Source: Musnad Aḥmad 12491
So if you have endeavors for the benefit of creation keep it going for the sake of Allah and His Messenger peace be upon him!