Go to the Liquid file where you want to display the page title and copy and paste the code below. It’s a global variable provided by Shopify to dynamically display the title of the current page.
{{ page_title }}
This will output the title of the current page.