Main thing is to do the obligations and to stay away from forbidden acts. To prepare for his reappearance by doing community work and Serving others, and establishing organisations and institutions to spread Islam and Shiasm as well as humanitarian work.
These two books are good
https://www.al-islam.org/shiite-encyclopedia/last-luminary
https://www.al-islam.org/al-imam-al-mahdi-just-leader-humanity-ibrahim-amini