I hate to answer my own question, but the reason was the initial connection.
After changing the url from 'https://.sharepoint.com' to 'https://.sharepoint.com/sites/office', I was able to display the files.
$siteUrl = "https://<subdomain>.sharepoint.com/sites/office";
$credentials = new ClientCredential($settings['ClientId'], $settings['ClientSecret']);
$ctx = (new ClientContext($siteUrl))->withCredentials($credentials);
I hope this answer helps others