You can remove the code from the onBootstrap method. In laminas the session is started via the AbstractContainer::__construct method. See the link below for the code relevant to that. In laminas Session is autowired via its factories. You can find which ones are being called in the /vendor/laminas/laminas-session/src/ConfigProvider::getDependencyConfig() method. For laminas components that expose support for both Laminas MVC and Mezzio the Module class just proxies to the ConfigProvider class.
You can find the migration guide here:
https://docs.laminas.dev/migration/
You can find a presentation by Zend here:
https://www.zend.com/webinars/migrating-zend-framework-laminas
Location where the session is started
Since you are trying to upgrade you may want to take a look at the documentation for usage in a laminas-mvc application. It covers all the new options.
https://docs.laminas.dev/laminas-session/application-integration/usage-in-a-laminas-mvc-application/