The response given by me is correct. What it is incorrect is to say "an bug"
You do not say "an bug", you say "a bug". An is only before vowels. And in this case you did not used "E um", which means "it is a/an". "a bug" translates as "um inseto"
That's what he's saying. I also wrote "It is a bug" and it was marked as wrong. The "correct" answer that Duolingo provided said "an bug" which is incorrect and should be fixed.
You'd use the latter (mostly) when a subject was used before.
Olha essa formiga. Ela é um inseto. (Look at this ant. It's an insect)
O que é isso? É um inseto/Isso é um inseto (emphatic)