When you plug in an external keybord, a button labeled “Change Keyboard Type” appears in the keyboard preferences window. When you press it, you get asked to press some keys on the keyboard, and MacOS will decide whether it’s an ANSI or ISO type, or something else.
If you make a mistake, or the keyboard is detected as the wrong type, you can’t do it again. The button actually disappears, and will not reappear for that keyboard ever again. MacOS actually saves the keyboard’s hardware identifier so it can remember not to show you this option.
When you use the “Modifiers” panel to re-bind modifier keys, you have to do it for each attached keyboard separately. But when you change the keyboard layout — say, from Mac to PC, your choice always applies to all keyboards attached to the computer.
This is backwards. If I want to re-bind Caps Lock to Control, I’m going to want that to happen no matter what keyboard I’m typing on, but it won’t. And if I plug a PC keyboard into my Mac and choose the PC layout for it, then of course that means I just want to use the PC layout for the PC keyboard, but no, MacOS will then use the PC layout for the Mac’s own built-in keyboard as well.