Prevent apps on iPhone from triggering icons on Mac dock
Go to System Preferences → General and disable ‘Allow Handoff between this Mac and your iCloud devices’.

This feature is called Handoff, part of Continuity. You can read more about it in the Apple KB:


Use Continuity to connect your Mac, iPhone, iPad, iPod touch, and Apple Watch