In Unreal Engine 5, creating an interactive light switch is a simple and effective way to introduce player interaction and basic Blueprint scripting to a project. The setup typically involves two main elements: a light actor placed in the level and a button or switch actor that the player can interact with. The interaction is usually handled through Blueprints, using events that detect when the player presses a key, triggers a collider, or interacts using a line trace.
https://dev.epicgames.com/community/learning/tutorials/1o1o/how-to-switch-a-light-on-and-off-with-a-button-in-unreal-engine-5