Can you advise how I can determine that 개미를 refers to ants plural when the sentence doesnt use 들, which for me indicates plural?
Frankly speaking, depending on the context, 개미를 may mean either singular or plural. Frankly speaking, Korean is relatively less strict on distinguishing singular and plural.
Even when there are more than one lizard, some natives might still say 도마뱀이 갑자기 개미를 먹어요
(Be careful in case you intend to sit for a language proficiency exam as they will be extra strict obviously.)
Will there be lots of confusion? Nope since in the real life, we usually have more than just one sentence to figure out the context. A lot of Koreans indeed struggle when they learn foreign languages that really make a federal case out of singular/plural.
Korean (in practice, at least) also does not distinguish between "lizards" in general and "geckos" specifically. Both are 도마뱀.
can someone explain why I got it wrong when I wrote "lizards suddenly eat ants" I just left out "the" how do I know if I need to add it or not?