Insidious means “harmful in a sneaky way.”
Invidious means (1) “offensive” or (2) “resentful.”
Insidious can describe anything harmful but slow-moving or hidden—something bad that sneaks up on you—like many long-term health problems and social issues:
Addiction can be insidious; it destroys a person slowly.
Racism is insidious; it can spread beneath the surface of a society for many years.
You may be reminded of the character Darth Sidious from the second Star Wars trilogy; he is the evil politician, better known as Senator Palpatine, who insidiously corrupts the Republic and Annakin Skywalker over a period of years.
Invidious describes actions and words that people hate. Originally, it meant “envious, jealous.” Nowadays it can describe either a hateful action or a resentful person:
The politician lost the race after making invidious comments about immigrants.
The two enemies regarded each other invidiously as they prepared to fight.
Invidious is a high-style word, not often heard in casual conversation.