How can I implement a Many to many design?

I am new to database design and I am not sure whether or not I should use SQL or NoSQL this is for a small task just trying to teach myself new things. I have an API I want to build that is sort like a messaging api. I want to be able to add users to groups the incoming JSON data would like this:

  "groupname": "",
  "usernames": [

Here is the my current data model code using SQLAlchemy.

class User(db.Model):
    __tablename__ = 'users'
    username = db.Column(db.String(255),

class UserSchema(ModelSchema):
    class Meta:
        model = User

class Groups(db.Model):
    __tablename__ = 'groups'
    groupnames = db.Column(db.String(255),
    username = db.Column(db.String(255))

class GroupsSchema(ModelSchema):
    model = Groups

So I know that I dont want to store a "list" of usernames in a single column if I were to use a SQL based solution. How else would I accomplish this? is NoSQL better for this task? I am not exactly sure how I would create this relationship? (I think it is a many to many)