Create a new geometry (TAB in the network editor > Geometry node).
Double click on the node to enter into its empty network
Press TAB and add a box node and make sure its primitive type is ‘Polygon’:
Press TAB again and create a sphere, and change the primitive type to polygon:
Move the display flags to the sphere by holding R and dragging to select the sphere, then activate the template flag on the cube.
Move the sphere so that it has a clear overlap with the cube:
Add a ‘boolean’ node to the network:
Connect both object nodes to the inputs of the boolean node, hold R and drag to move the display flags over to the new node:
Modify the output geometry settings to get the desired effect:
Changing the operation to subtract will have an opposite (and expected) result:
And changing the A – B option will define which object is subtracted from which: