Office 365 Groups and Microsoft Teams are both collaborative spaces, like SharePoint Online (SPO), but they are not highly configurable. You can add some connectors and apps to both applications but that is the extent of their configurability. This can be an advantage if you want to quickly set up a place to manage projects but don't want to devote, or don't have, the time to set up a full SharePoint site. When either Office 365 Groups or Microsoft Teams is set up, a SharePoint site is also set up automatically for a little bit of extra magic.
Teams and Groups seem to be very similar on the surface but Microsoft actually took a different approach with each when their respective technologies were developed.