While going to setting>website>pages>integration you need to select domain first for which you need to update google tag manager code and then after doing changes save and check
Please refer below image:-
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.