I have my new MB Air (Sonoma) sitting next to my iMac (Sonoma). When I open certain applications on both, I get a funny thing in my dock. A second icon appears. In the case of Messages, it looks like this. A second Messages icon, with a little box at upper right.

What in the world is that second icon? Why do I need it, and how can I prevent it from popping up and messing up my dock?
Same thing happens with browsers, where I open Chrome on one machine, and a Firefox (my default browser) icon appears on the other, with a little box at upper right.
Why should what I do on one machine have anything to do with what happens on my other machine? This makes no sense.

What in the world is that second icon? Why do I need it, and how can I prevent it from popping up and messing up my dock?
Same thing happens with browsers, where I open Chrome on one machine, and a Firefox (my default browser) icon appears on the other, with a little box at upper right.
Why should what I do on one machine have anything to do with what happens on my other machine? This makes no sense.