What kind of content are we talking about here? Channel posts, documents, files? You can restrict Guests from editing/deleting posts via the set of Messaging settings under the Teams Admin Center > Users > Guest access:
For restricting files/document access, you will have to play with SharePoint permissions. Or apply sensitivity labels.