When we work with SharePoint data, we first try to access a SharePoint list. To access a list via REST, we need to know the title or ID of the given list. If we don't know at least one of those, we can iterate through all the lists on the site.
Open a SharePoint site in a browser and check that it is working normally. In the following picture, we are opening a site collection root site from the URL address https://yourtenant.sharepoint.com/sites/spfx.
When we open a SharePoint site in a browser, we authenticate the browser, and after that, we can manually modify the URL in the browser address bar to access the API service endpoint. Change the URL address to https://yourtenant.sharepoint.com/sites/spfx/_api/web/lists, and what you can see is SharePoint REST API responding to a simple GET request. The default response format is XML and not JSON because of historical reasons. The word historical is a bit odd in the context of the Web in general, because...