Texture on wall with 90d angles


First post of beginner. I’m composing a scene including a window-like hole in the wall with brick texture on it. The wall is a plane object with texture put on it by texture coordinates and mapping nodes (no UV) and on sides of the window (inside) the texture is distorted.

I am wondering if you can tweak some settings to force the texture to nicely cover those areas or UV mapping is advised/required?

Try setting the texture projection setting to ‘Box’ instead of the default ‘Flat’

Or give those faces not correct their own separate material with the texture correctly aligned

It was set like it but it encouraged me to look around it and I applied rotation and scaled a texture on x axis by 0.07.
Thank you!