The EventSystem manages UI interaction.

It handles:

With the modern Input System, use:

Input System UI Input Module

Select an element:

EventSystem.current.SetSelectedGameObject(
    button.gameObject
);