2D Collisions Not Working

I have a bullet object that I’m trying to get to collide with 2 different sets of objects. I separate the two types of objects using two different tags, one is moveable thus allowing the bullet to apply velocity to the collided object. The other is static like the ground. For some reason collisions with the moveable objects work but not the collisions with the static objects and I don’t know why. I’ve made sure to attach 2d Box Colliders to all the objects. Any help would be greatly appreciated since I am still very new to unity. My bullet script is attached below.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Bullet : MonoBehaviour {

    public Transform gunTransform;
    public float speed = 5f;
    public float lifeTime = 5f;

    Vector2 moveVector;

    public void Start()
    {
        gunTransform = GameObject.Find("PlayerGun").transform;

        moveVector = gunTransform.rotation * Vector2.right;
        moveVector /= moveVector.magnitude;
    }

    void FixedUpdate()
    {
        transform.Translate(moveVector * speed * Time.deltaTime);
    }

    private void OnCollisionEnter2D(Collision2D collision)
    {
        Debug.Log("Colliding");

        //Not Working, Static objects don't even registor collisions
        if (collision.collider.tag == "StaticObstacle")
        {
            Debug.Log("Hit Static");
            Destroy(gameObject);
        }

        //Working Script
        if (collision.collider.tag == "MoveableObstacle")
        {
            collision.collider.GetComponent<Rigidbody2D>().velocity = moveVector * speed;

            Destroy(gameObject);
        }
    }

    void Update()
    {
        lifeTime -= Time.deltaTime;

        if (lifeTime <= 0)
        {
            Object.Destroy(gameObject);
        }
    }

}

If your object with collider is moving, you need to attach a RigidBody to that object too.

It’s RigidBody2D for your 2D colliders.

The Rigidbody2D class essentially
provides the same functionality in 2D
that the Rigidbody class provides in
3D. Adding a Rigidbody2D component to
a sprite puts it under the control of
the physics engine. By itself, this
means that the sprite will be affected
by gravity and can be controlled from
scripts using forces. By adding the
appropriate collider component, the
sprite will also respond to collisions
with other sprites.
This behaviour
comes entirely from Unity’s physics
system; very little code is required
to get impressive and authentic
physical behaviour and allows for
“emergent” gameplay that was not
explicitly coded into the game.

Ensure the following things are considered in your code,

  1. All gameobject should contain collider attached and the player gameobject should contain the rigidbody component in it.
  2. The collider size should change to the width and height of the component instead of default (1,1) values.
  3. Uncheck isKinematic option in Rigidbody component if it’s selected.