How is this working?

How does the forum knows my last visit and showing this notification ? Based on any cookie ?

Since you are logged in, I’m guessing that Discourse looks at your last active timestamp and compares it to new and updated topics.

Even if I’m not logged in, it knows. If we know how this works, it will be very useful in cases like update someone when backend changes already happened. May it is using push behind the scenes ?

If it’s showing that also when you are not logged in, it sounds cookie-based.