Is there any way to run blueprints before the player spawns?

I have an algorithm made to determine which playerstart to use but the issue is I can’t figure out a way to have that algorithm run before the player spawns essentially making the algorithm useless

Several classes initialize before player spawn. You can try sticking it in the gamemode blueprint on the OnPostLogin event.