Well, first things first. I tell this to everyone, but learn to use Interface blueprints, it will make your life MUCH easier, and help you get away from messy Cast To nodes. Not going into great detail on what needs to be done with those unless you need me to, though.
Secondly, you don’t. You take an object reference from the the raycast, and either use an interface to call a function on the object (best solution), or use something heavy handed like checking it against “get all objects of type” or “get all objects with tag”. There is also the option of using a “Trace By Object” which only returns objects of a given type. However, those are really, really messy and heavy handed. Use interfaces, interface functions can fail silently which makes them particularly useful for these types of instances.
Create an interface function, and have the function perform all of your binding. When the user presses the E key, call that function on the object return from your hit. If it doesn’t have it, it will fail silently.