Negative mold of an STL

Hi. I have an stl file regarding the segmentation of part of the skull. Now, I need to create the negative mold to create a box mold similar to the figure. Anyone knows how to do it? My problem is the irregular shape of the bone. Thanks for the help.
Captura de ecrã 2023-05-25, às 17.23.37
Captura de ecrã 2023-05-25, às 17.24.25

Captura de ecrã 2023-05-25, às 17.13.49