Top Down Shooter - Turret target list

I’m still a beginner with Unity. I’m creating a top down shooter and ran into a problem.
I made a turret that can shoot and aim at objects. I want this turret to be able to make a list of targets that enter a certain range (using a hitbox). I want the turret to be able to prioritize on Objects with Player Tag, then Enemy Tag, then Object Tag. then I want the turret to focus on the first object that entered this range, for example when there are multiple enemies in range. I thought maybe someone with more experience then me could help me with this?

Well you can make a List of GameObjects, you can fill the list using OnTriggerEnter and remove with OnTriggerExit or you can use OverlapCircle/OverlapSphere to fill the list, then you can use lamba expression or write your own sort method to sort them by how close they are, you can give priority to different types of gameObects by putting them to the top of the list, but you might need to balance that out better, or perhaps you can do 3 different lists.