Landscape needs to be edited not only in the editor, but also at runtime

For example, when building a building, players will automatically level the terrain at the bottom of the building. Players can dig holes in the terrain to build basements or tunnels, etc. is there any way to do it?
I think you can develop a volume box that can be placed dynamically, which can be set to fill \ empty \ hide. Corresponding to filling the bottom of the building, dig down the terrain for a distance, and landscape visibility mask