In this blog, We will see how to get order data by using order id in magento 2. Order details contains the order information like Total summary, Customer Info, Billing, shipping and payment-related data in Magento 2.
Using Dependency Injection (DI), You can use \Magento\Sales\Api\OrderRepositoryInterface class to get order details using order id.
Below way, you can get Order Details using Order ID in Magento 2.
You can call the above function in the template by block function.