How to get payment method title of an order in magento 2?

You can get payment method title of order by below code snippets,