Better not teach beginners to use tags for cases like this, it’s a bad practice. Since we have a Player script only on player, would be easier to check if collided object has it. Same one line of the code:
void OnCollisionEnter(Collision collision) {
if (collision.gameObject.TryGetComponent<Player>(out Player player)) {
// it was a player!
}