PlayerInput connects a player GameObject to an Input Actions asset.

Get it:

private PlayerInput playerInput;

void Awake()
{
    playerInput = GetComponent<PlayerInput>();
}

Useful properties:

playerInput.currentActionMap
playerInput.currentControlScheme
playerInput.devices

Switch maps:

playerInput.SwitchCurrentActionMap("UI");