If statements in OnTriggerEnter2D

Am I correct in saying that if you have tags in if statements in the OnTriggerEnter2D methods, the collision layers wont work?

No, collision layers and tag comparisons are completely separate things.
I’m guessing you’re having an issue where you’re trying to compare the tag of an object that entered a trigger collider, but the condition isn’t resolving to true?

I have a collision method
and in it im checking if the object is being hit by bullets a missile or guns
but the object wasnt exploding when my player hit into it despite them being on the same layer
but i fixed it by if player in the method.