So...if there is something stated on one episode that contradicts something in another episode, both are canon even if they are not consistent?
Yep! And you either quietly ignore the inconsistency or try to rationalize it somehow.
There's no "official" process or authority to determine which episodes are more "canon" than others. And no episode or movie has ever been "officially" stricken from the continuity.
In general, it's easier just to quietly forget about an inconsistency rather than make a big deal about it.
When you're dealing with five live-action tv series, twelve movies (and counting) and several hundred novels and comic books and short stories and such, written by dozens of different people over the course of nearly fifty years, it's almost inevitable that the pieces aren't always going to fit together perfectly. That's just how it goes.
Making TV is an art, not a science.