Script adds rigidbody but player can walk straight through the gameobject?

I have a scene in which the player is inside a house and the walls fly away when the player collides with them, this works well however I want the Rigidbody to be added UPON the collision, if I simply add it in the editor all of the walls fly away when the scene begins!
I have the script below which adds the rigidbody however the player just walks straight through the wall, why would this occur? I have another wall in which I have manually added the rigidbody and it works fine…

using UnityEngine;
using System.Collections;

public class OnCollisionAddPhysics : MonoBehaviour {

    void OnTriggerEnter(Collider other)
    {

        if (other.CompareTag("Player"))
        {
            Rigidbody newRigidBodyComponent = gameObject.AddComponent<Rigidbody>();

            gameObject.GetComponent<Rigidbody>().useGravity = false;

            Debug.Log("collided!");
        }
    }

This screenshot shows a wall that behaves as I intend however I have manually added the rigidbody

This screenshot shows a wall in which the rigidbody is added via my script and the player walks straight through it

Thanks in advance to any assistance!!

In the script change the defaul value “isKinematic” to true.
The script should look like this:

 using UnityEngine;
 using System.Collections;
 
 public class OnCollisionAddPhysics : MonoBehaviour {
 
     void OnTriggerEnter(Collider other)
     {
 
         if (other.CompareTag("Player"))
         {
             Rigidbody newRigidBodyComponent = gameObject.AddComponent<Rigidbody>();
 
             gameObject.GetComponent<Rigidbody>().useGravity = false;
             **gameObject.GetComponent<Rigidbody>().isKinematic = true;**
 
             Debug.Log("collided!");
         }
     }