@Arcane94 Basically I think the issue is that you are using transform for moving your enemy. Collision are not effected on transform changes. Transform simple teleports from one point to second point. You should add a rigidbody if not added and use Addforce for this. Only then you will see the effects of collisions.
I would make sure there’s a collider on the enemy and the walls. The collider on the wall should be just a little wider than the wall surface.
Yes, NavMeshAgent is useful, but if you won’t use that, then try a raycasting method. The raycast should aim in the same direction the enemy is looking/facing. If the player is close by and the raycast picks up a surface not relative to the player, you can have the enemy’s transform move another direction until the raycast line picks up the player, then return the transform movement like normal.
Just an idea.
Note that I am clamping the magnitude to avoid going too fast and multiplying the axis to have more reactivity. You have to add something to the velocity, not assign it, else the gravity won’t work anymore.