Zend certified PHP/Magento developer

URI is not valid and cannot be converted into a string when trying to load website

Preconditions (*)

  1. PHP 7.4.27
  2. composer 2.1.4
  3. Magento version 2.4.2-p2 enterprise
  4. Elasticsearch 7.16.2
  5. Redis Cache 5.0.14
  6. Grunt 1.0.4

Steps to reproduce (*)

  1. Install a fresh installation of Magento with multiple store views (3-4), and added my custom code for the website
  2. Try to access the homepage

Expected result (*)

  1. Site should load the default homepage

Actual result (*)

  1. Site displays error saying URI is not valid and cannot be converted into a string
    image
    image