Who knows how I can organize this?
I have two tables:
Now i want to automatically add the name of a new member to the first open spot of the particular group.
For example, if Joe is the 5th member signing up for Group X, then his name should automatically appear in column five of that group.
Is this possible?
This is possible with a scripting automation. With the base structure shown in your screen shots, it is not possible without code.
However, I suggest that you investigate a different base design. Your table structure looks like you are familiar with spreadsheets. Despite the visual similarity to a spreadsheet, Airtable is not a spreadsheet–it is a database. Here is some food for thought:
By the way, based on your screen captures, it looks like you have a one-to-many relationship, not a many-to-many relationship. One group can have many members, but each member belongs to only one group.
Do you want to write the script yourself or do you just want working code?
If you have budget to hire someone to write the code, you can read about my approach to custom script development on my website.