These are two different ways of using nfc tags.
With an application like NXP Tag Writer you can write a url to a capable NFC tag. Everyone who scans this NFC.tag after can open this url because it is read from the NFC tag itself. All your phone does is opening the url.
Or: you don’t write anything to the NFC tag itself and leave it “factory default”. Then your phone reads the unique key from the NFC tag.
An application on your phone (like Tasker on Android) is “programmed” to do a certain action when the.tag is scanned. So: when tag XXXX is scanned, THEN open an app, THEN visit a url, THEN create a wake up alarm, etc.
That is a secure way op performing actions because the tag doesn’t hold the actual information/action, but your phone does. It is just a way of triggering an action stored on your phone.