The first step I would recommend going to the "Settings" menu on Xbox and selecting "System". Then you need to select "Storage" and then "Storage Management". There you can see information about free space on the disc and the general state of the disc. If you need more detailed diagnostics, you can use specialised programs available for download from the Microsoft Store or the official Xbox website. These will provide more detailed information about the state of your disc, including checking for errors and fragmentation. It's important to check the health of your disc periodically to prevent data loss and ensure your console is running more consistently. If you are interested in where you can find such programs or get more information about the health of your console, I recommend checking out
https://www.xboxgo.com/. There are often useful resources and tips on console care there.