A cheat code to make a self-discovery moment appear... I think I can help, but I can test if it works later.
Just remember that if your sim has Socially Awkward trait, they cannot get a moment for Loner trait. I have detailed my findings on that topic here.
But here are the cheats I think will work. I'm not sure for now, but I can test them later.
Loner trait is the part of Social category of self-discoveries, so the cheat would be this:
stats.set_stat commodity_SelfDiscovery_Tracker_Social -100
Clumsy trait is the part of Skill category of self-discoveries, so the cheat would be this:
stats.set_stat commodity_SelfDiscovery_Tracker_Skill -100
I hope these work, but for now, I'm not sure. If something goes wrong, exit without saving.