Phoenix ecto save foreign key from selected list

Hey there,
I am trying to set a a team - user relation where a user can be in a team.
I have the relation set up and in the db I have the field for team id for the user.
I also have the teams as options for the user set up when we create a user, with name and id.
How could I save that id to that field that was created by association the 2 tables?
I used these resources: