if it is a static object in the world (not a blueprint)
- select the object
- go to it’s details panel
- go to the rendering section
- set the Actor Hidden In Game flag to true
- go to the Lighting section
- set the Cast Hidden Shadow flag to true
if it’s in a Blueprint, select the component and do the above in its details panel. Hope this helps!