Open the folderĀ vendor/magento/module-catalog/view/frontend/layout/ the file to copy is catalog_category_view.xml Copy that in to your theme folder inĀ Magento_Catalog/layout
Add following line at the end of that file before the closing body tag
< move element="page.main.title" destination="content" before="category.products"/>