I want a lot of customization for my site. Hence I need to create Custom master page and custom Page Layouts for my team site. But I read a few articles which say it would not be a good practice to create Custom master page and page layouts Sharepoint online since microsoft might give updates and stuff will break. So what would be the recommended approach for customizing a site in Sharepoint online?
In SharePoint Online, For Modern experience, you can use SharePoint Framework (SPFx) for customization. Using SPFx you can create:
Also, you can create Modern site pages and select different layouts according to your requirements.
- Customizing the "modern" experiences in SharePoint Online.
- Customizing "modern" team sites.
- Customizing "modern" site pages.
- Customizing "modern" lists and libraries.
However for Classic experience, you can customize the master page and create your own custom page layouts. But, as you already know that this is not a good practice and Microsoft will not provide support for this.
There are a few way to customize a SharePoint and it all depends on what you want to accomplish.
First of all. If you are using the Modern view of SharePoint you can't customize the master page nor the page layouts. Neither can you edit the css. You can do theming and site designs though. For custom snippets you can use SPFx to add things like header and footer also custom web parts.
If you are using the classic experience you can do a custom master page but Microsoft will not support it. You will have to maintain it yourself. Custom page layouts are supported. Custom Web Parts are supported and you can use SPFx web parts on the classic experience.
If you do not want to customize the master page I'd utilize the alternate css method.
Good luck, cheers!