This snippet alone has already two issues which would make it to not compile. First your if statement inside OnCollisionEnter2D starts with an uppercase “I”. It has to be if. Your “OnCollisionEnter2D” method is missing the Collision2D parameter “coll”.
In case those were just typos here on UA the only other condisions we can’t check are:
Is the script attached to an object with any Collider2D?
Does the object where this script is attached to has a Rigidbody2D component?
Are you sure that the object you collided with is tagged “Enemy”?