Let’s add a friendly image so that people don’t see any spoilers by accident.
So, the way I see it the Emperor probably tailed Shadowheart’s team who liberated the Astral Prism. Maybe he even got the Nautiloid and some cultists and Mindflayers from the Elder Brain so that he could extract Shadowheart’s team. Orin left her sibling on there for good measure. Mindflayers doing Mindflayer things they abducted Shadowheart.
But as soon as the Prism was close enough the Elder Brain lost its grip on the Emperor. Probably just him because he already was able to leave an Elder Brain once. Seeing the opportunity he killed the Mindflayers near him and took control of the Nautiloid.
Being the practical Mindflayer he probably sought to build an army of tadpoled people with super duper Illithid powers to fight the Absolute. He went to Baldur’s Gate to find more people and thus snatched up Tav and the others.
The Githyanki were in close pursuit and disrupted him so he had to flee. When the Nautiloid arrived on Avernus he hid inside the prism.
I’m not quite sure where Lae’zel fits into all this. She probably went aboard the Nautiloid to get her Mindflayer head but was captured instead. She didn’t know anything about the Prism because it was way above her paygrade.
What do you think happened? Or is there an official version of the events that lead up to the game?