<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Vendor\Module\Model;

use Magento\Catalog\Api\ProductRepositoryInterface;

class TheClass
{
    /**
     * @var ProductRepositoryInterface
     */
    private $productRepository;

    public function __construct(ProductRepositoryInterface $product)
    {
        $this->productRepository = $product;
    }

    public function execute()
    {
        $this->productRepository->get('sku');

        new \Magento\Catalog\Model\Product();
        new \Magento\Notamodule\Model\Product();
    }
}
