How to set an object reference of an actor that is spawned in?

Ah well that sounds a lot more complicated than I anticipated, and the script I showed is actually inside another actor in the scene that the player can interact with. The widget gets created when the player interacts with a fridge (this script is inside the fridge actor)