Should I use both lines when move selection focus by code?

For first selected UI button for set default for console game controller,

I using,

EventSystem.current.firstSelectedGameObject = gameObject;
EventSystem.current.SetSelectedGameObject(gameObject);

but does these 2 lines should be used both? or can be omit by just 1 (which?) line?

Try it and see ¯_(ツ)_/¯

I think firstSelectedGameObject only really matters if you set it in the inspector before runtime - it probably gets used in Awake or Start for the EventSystem.

For setting a UI component as the target when the UI is enabled for the first time use this one.

For moving between UI components use this one.