How do you hollow out part of a mesh using another mesh?

I’m not sure if someone else has asked a similar question, but I made a mesh and I would like to cut a rectangular prism out of it to make part of it hollow. How do you go about doing this in Blender 5.1.2?

Use a boolean modifier on the original mesh. Select difference and then choose the mesh that you need to carve into the object. Place this mesh in the correct position and hide it to see the result. If it doesn’t work try changing between float and exact, or add more geometry to the original mesh (e.g. loop cuts) and you’ll see the result. A note: this does mess up your topology so if you’re doing something like making assets for a game you might want to spend some time cleaning up the topology.

There are also addons like bool tools that do the same function

If your mesh allows for this you can also try using the option of bridge edge loops. I’m not sure if this option is on by default if not go to addons and enable loop tools.