Wikipedia is edited by people like you and me, and as such, it's wrong half the time.By that metric (assuming we believe wikipedia, since that seems to be where this is coming from) the Switch is still 8th Gen (since it came out the same year as the X1X).
The Wii-U and Switch can not be a part of the same generation. Therefore, it's simple mathematics. The Switch is the successor to the Wii-U, so it's ninth gen. The reason this whole confusion began was due to Nintendo releasing the Switch three years before PS5 and Xbox X/S. Prior to that, the big guys usually launched consoles within a year of each other. But Nintendo needed to get something new out, since their Wii-U was in shambles. They also wanted to beat the other guys to the punch and hog the spotlight for awhile--and it worked.
But make no mistake: the Switch is not eighth gen. There can't be two different gens in the same gen.