You can create a BluePrint for the door and the switch object that has to be turned on/off.
In the switch BluePrint, you should create a variable called “activated” or something like that. Once the user presses E on it, you can change it from false to true, or vice-versa.
In that same block of code, if the switch gets activated, you can use a node like “Get All Actors of Class” and then find your door BluePrint. You can then, with the returned value, do whatever you want with it. You could create a function for the door BluePrint called “Open” and call that once the switch is activated.
Good luck, hope that helps!
EDIT: I see you’ve added pictures now. I didn’t see these before, looks like they were added 3 hours after my post.