From Lazarus Cain@21:1/5 to All on Tue Oct 24 07:18:34 2023
Allah guides him to his straight path, and guides him to be very pious after he'd been just like any other person (prone to sins), then guides him to become the Mahdi
The Mahdi will not know he's THE MAHDI until the time comes. Notice how Allah guides him during a (single) night, not a few nights or weeks. It happens overnight.
PS: I don't know anything about the Shia story of Mahdi,