This page describes various general troubleshooting steps for Xbox One issues.
Laggy Xbox UI
The most commonly recommend solution from Microsoft support is to clear your system cache. You can do this by turning on your console, then holding the power button until it shuts off, unplug it for 30 seconds, then plug it back in and turn on the system.
It's also been found that completely deleting your messages and purging as many friends as possible will greatly improve performance for both the Xbox UI and even, in one report from the professional Halo player "Naded", a significant increase for in-game performance. This also applies to Series X/S consoles.