Method depends on the game's supported modes.
Examples: Halo MCC, Gears 5, Minecraft, Rocket League, Call of Duty (some), Borderlands 3
Connect two Xbox Ones via Ethernet switch/router. Supported in Halo MCC, Gears 5, Minecraft. No internet/Gold needed.
Before buying: Search "Game Name split screen Xbox One" or check the store page "Capabilities" → "Local multiplayer (2)".