Error after publishing site online: Return value of Grav\Plugin\ProblemsPlugin::autoload() must be an instance of Composer\Autoload\ClassLoader, int returned

The site was running smoothly on Xampp windows. Php version 8.2.0
But online not. php 8.2.6
Gives the following error:

Return value of Grav\Plugin\ProblemsPlugin::autoload() must be an instance of Composer\Autoload\ClassLoader, int returned

Tried looking for a solution but did not find any clues. Anybody any suggestions?

Changed the PHP version to other versions but that did not resolve the problem.
Removed the complete site and copied it again. Same problem.

Complete log underneath:

[2023-09-24 20:31:05] grav.CRITICAL: Grav\Plugin\ProblemsPlugin::autoload(): Return value must be of type Composer\Autoload\ClassLoader, int returned - Trace: #0 /var/www/vhosts/top-it.org/httpdocs/system/src/Grav/Common/Plugins.php(146): Grav\Plugin\ProblemsPlugin->autoload() #1 /var/www/vhosts/top-it.org/httpdocs/system/src/Grav/Common/Processors/InitializeProcessor.php(379): Grav\Common\Plugins->init() #2 /var/www/vhosts/top-it.org/httpdocs/system/src/Grav/Common/Processors/InitializeProcessor.php(99): Grav\Common\Processors\InitializeProcessor->initializePlugins() #3 /var/www/vhosts/top-it.org/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\InitializeProcessor->process() #4 /var/www/vhosts/top-it.org/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #5 /var/www/vhosts/top-it.org/httpdocs/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php(40): Grav\Framework\RequestHandler\RequestHandler->handle() #6 /var/www/vhosts/top-it.org/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport->process() #7 /var/www/vhosts/top-it.org/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #8 /var/www/vhosts/top-it.org/httpdocs/system/src/Grav/Common/Grav.php(312): Grav\Framework\RequestHandler\RequestHandler->handle() #9 /var/www/vhosts/top-it.org/httpdocs/index.php(47): Grav\Common\Grav->process() #10 {main}

Fixed by OP by reinstalling the site: See comments on post of OP on StackOverflow