Safari icon from iPhone showing in macOS Dock
This is Apple Handoff in action:


  With Handoff, you can start something on one device (Mac, iOS, or Apple Watch)   and then pick it up on another without losing focus on what you’re doing. For example, look at a webpage on your iPhone, then pick up where you left off in Safari on your Mac. You can use Handoff with many Apple apps—for example, Calendar, Contacts, Pages, or Safari. Some third-party apps may also work with Handoff.


(Image and text attribution: Apple.com)