This is my current table design

I have a many to many relationship.
For example I created / inserted an entry to the musicians table how do I actually pass its primary key (id) that is generated from it and immediately insert it to field musician_id from musician_x_instrument table?
Assuming you use mysqli, you get if using the insert_id function:
You then insert this ID in the join table as you would insert any other data into any other table.