Enable Content Editor Web Part - CWEP in Teams and Group Sites
If you try editing site pages in the associated SharePoint site created when working with Teams and Groups, you'll find that you only get the following web parts under Media and Content:
Getting started with your site
Image Viewer
Page Viewer
Picture Library Slideshow Web Part
Pretty limiting indeed! In fact, the following list identifies all the web parts that are not enabled.
Business Data
Visio Web Access
Content Rollup
Relevant Documents
Term Property Timeline XML Viewer Media and Content
Content Editor - CEWP
Script Editor
Silverlight Web Part Search
Refinement Search Box
Search Navigation
Search Results
Social Collaboration
User Tasks
To enable these web parts, you need to
2. Enable custom scripts on the site through PowerShell SharePoint Online Management using the following script.
The "DenyAddAndCustomizePages" setting will revert back to enabled after a day or so but the web parts you add will continue to work.
For more details, check out Allow or prevent custom script on the Microsoft support site.