How and when our souls were created, only Allāh ﷻ knows. But the Prophet ﷺ said our souls saw each other at that time. Some were happy together, and some ran away from others. When we come to this life it is the same. We are hoping to be happy with good people.