How can you do in UE4 to make an object not render if it is hidden in game, so that it doesn't take resources and how can you make it show this object and start rendering?

in Unreal Engine 4 I tried to do a custom render in CPP and Blueprint but still the problem is because it automatically renders this object if it is hidden in game, is it possible to somehow make the render not render an object that is hidden in game as if it does not exist and only after some sequence?