magento2 – Error while loading product using id magento 2.4

I am trying to set meta title tag after redirect. I am using the answer from this link.(Plz check the answer in tha above link which has been awarded a bounty of +50 reputations). I have also added that answer in my question.

Setting Meta Title with Redirect

My Code. I have created events.xml file in my module.

/app/code/Vendor/Module/etc/frontend/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="catalog_product_load_after">
        <observer name="dynamic_title_generator" instance="VendorModuleObserverAfterProductLoad" />
    </event> 
</config>

Add below code in my Observer

/app/code/Vendor/Module/Observer/AfterProductLoad.php

<?php
namespace VendorModuleObserver;

use MagentoFrameworkEventObserverInterface;
use MagentoFrameworkEventObserver as EventObserver;
use MagentoStoreModelStoreManagerInterface;

class AfterProductLoad implements ObserverInterface
{
    /**
     * @var StoreManagerInterface
     */
    private $storeManager;

    /**
     * @param StoreManagerInterface $storeManager
     */
     public function __construct(
        StoreManagerInterface $storeManager
    ){
        $this->storeManager = $storeManager;
    }

    public function execute(EventObserver $observer)
    {
        $product = $observer->getProduct();

        //You can set any dynamic title from here as well.
        $product->setMetaTitle('custom-title');
        $product->setIsMetaApplied(true);
    }
}

The above code works fine and I am able to set the meta title data for the loaded product.

Now in the above observer I am adding a code that will load a product using ID and fetch its meta title attribute’s data.

Updated observer with the following code:

<?php
namespace MatridImprovedConfigurableObserver;

use MagentoFrameworkEventObserverInterface;
use MagentoFrameworkEventObserver as EventObserver;

class AfterProductLoad implements ObserverInterface
{
    /**
     * @var StoreManagerInterface
    */

    private $_storeManager;
    private $_productloader;

    /**
     * @param StoreManagerInterface $storeManager
     */
    public function __construct(
        MagentoStoreModelStoreManagerInterface $storeManager,
        MagentoCatalogModelProductFactory $_productloader
    ){
        $this->_storeManager = $storeManager;
        $this->_productloader = $_productloader;
    }



    public function execute(EventObserver $observer)
    {
        $product = $observer->getProduct();
    
        //Below 3 lines were added
        $simpleProductId = '61';
        $simpleProduct = $this->_productloader->create()->load($simpleProductId);
        $metaTitle = $simpleProduct->getName();
    
        $product->setMetaTitle($metaTitle);
        $product->setIsMetaApplied(true);
    
    }
}

But now I am getting an error due to this line of code.

$simpleProduct = $this->_productloader->create()->load($simpleProductId);

And the error goes after removing the above line and page loads fine.
This is the error screenshot
enter image description here

Now I feel I am getting an error because of loading product object in the event observer.

But I need to load a product using id and use its attribute’s data as meta title.

Now my question is:

  1. Is trying to load a product object in the above observer is wrong?

  2. And If yes, then how I can go on loading a product data and use that as meta title.
    Should I go with another event, I am not sure, Plz guid me regarding this.