Can Alert prevent Surprise if you don’t know the enemy exists?


In a large dark temple, a player with the Alert feat and Darkvision can only see out to 60 ft, but at 100 ft there is an enemy with 120 ft Truesight sitting in a Silence spell and firing a crossbow. If the player rolls 20 for initiative and the enemy rolls 10, does the player get to attack first? Or should the enemy get to fire the shot before initiative is rolled? Or should the enemy roll initiative for itself, fire a shot, and then have the player roll into the initiative?