How to get shipping description from the order by order id magento 2?

Get a Shipping description message from the Order using Order id in Magento 2 used to verify the shipping method title.

The shipping Description field contains the Shipping method title, setting from the Shipping method section of the Stores -> Configuration.

You can get the value of the shipping description from the order by fetching order objects. First, load the object by order id using order repository and get the value by getShippingDescription() method defined as the Below code snippet in Model Class.

<?php
namespace Jesadiya\Shipping\Model;

use Exception;
use Psr\Log\LoggerInterface;
use Magento\Sales\Api\OrderRepositoryInterface;

class ShippingDescription
{
    /**
     * @var OrderRepositoryInterface
     */
    private $orderRepository;

    /**
     * @var LoggerInterface
     */
    private $logger;

    public function __construct(
        OrderRepositoryInterface $orderRepository,
        LoggerInterface $logger
    ) {
        $this->orderRepository = $orderRepository;
        $this->logger = $logger;
    }

    /**
     * @return string
     */
    public function getShippingDescriptionText()
    {
        $shippingDescription = '';
        try {
            $orderId = '1'; // Dynamic order id
            $orderData = $this->orderRepository->get($orderId);
            $shippingDescription = $orderData->getShippingDescription();
        } catch (Exception $exception) {
            $this->logger->error($exception->getMessage());
        }

        return $shippingDescription;
    }
}

Call the method getShippingDescriptionText() at an appropriate place and pass order id in the method with your custom order id of an order.

If you have used native Flat rate shipping method for an Order,
Output:
Flat Rate – Fixed