I am really surprised how incredibly ignorant you are about some basic police business and about what it takes to actually be a sex offender. All police ask for ID. This was to establish your identity as well as to check your age.
It was found that you are an adult having sex with another adult. You committed no crime.
Next time, park it at home, under your bridge.
But, to answer your question directly: You know you are a sex offender when you have committed a sex crime, been caught doing it and are found guilty in a court of law. At which time, you would be ordered to register as a sex offender.
A cop catching you having teenage sex in a car is not considered a sex crime, unless you were raping her.