Nova regra, quando fizer perguntas que tenham "DOES (usado na 3a pessoa singular, e é o caso por que se usou o IT), então o DID/DO/DOES "mata" a regra do "s" nos verbos da 3a pessoa.
Tanto vale para o interrogativo (fazer perguntas) como para quando a frase for negativa.
As in the lyrics of "She doesn't live here anymore"https://www.letras.mus.br/roxette/34472/
So, for the sake of mnemonics, remember that DO/DOES/DID makes the verb to be in the infinitive form
We don´t talk anymore as in "we don´t talk
The verb will be TALK
- and if we that are listening the music would explain it to someone else, we would say that they don´t talk anymore
, he doesn´t talk anymore and she doesn´t talk anymore.
In short, the interrogative of "he lives/he talks" would be DOES HE LIVE...?/DOES HE TALK...? And the negative form would be "HE DOESN´T LIVE/HE DOESN´T TALK.
I hope it helps somehow.
Ah, and "how does it works?" doesn´t work! The correct form is "how does it work?