GetComponent().onClick

Code Example - GetComponent().onClick

                
                        //Make sure you add using UnityEngine.UI;
myButton.GetComponent<Button>().onClick.AddListener(() => { someFunction(); otherFunction(); });