Using delegates as function parameters

probably you re looking for event dispatchers. check this out Event Dispatchers / Delegates Quick Start Guide | Unreal Engine 4.27 Documentation.