Hi @sns ,
You can use the below PnP PowerShell command to enable publishing feature:
https://tenant.sharepoint.com/sites/sitename
#SharePoint Server Publishing Infrastructure of Site Collection
Enable-PnPFeature -Identity f6924d36-2fa8-4f0b-b16d-06b7250180fa -force -Scope site
#SharePoint Server Publishing of Site
Enable-PnPFeature -Identity 94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb -force -Scope web
For the "Master Page and Page Layout" link disappears this problem, please make sure that SharePoint Server Publishing feature and SharePoint Server Publishing Infrastructure feature are activated.
Thanks,
Echo Du
===================================
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.