か and っていうの are different topics.
The sentence in question is roughly the same as the following:
⸨日本人はなぜマスクをしているのか⸩を聞いている。
I'm asking ⸨why Japanese people wear masks⸩.
This か is a question marker, and 日本人はなぜマスクをしているのか is a type of noun clause called an embedded question (marked with ⸨⸩
). Here, this embedded question is serving as the object of 聞く.
Your question has っていうの, which is a colloquial variant of というの. って/と is a quotative particle, いう is basically "to say/call", and の is a noun menaing "(some)thing". So the literal translation of Xっていうの/Xというの is "something (people) say/call X". You may know this, but this construction is typically used like this:
- 彼が来るというのはいいニュースだ。
彼が来るっていうのはいいニュースだ。
That he will come is good news.
- 火鉢というのは暖房器具の一種です。
火鉢っていうのは暖房器具の一種です。
(The thing we call) hibachi is a kind of heating device.
The primary role of というの is to turn a sentence into a noun, as seen in the first example above. But it can be used after something that is already a noun, as seen in the second example. In such cases, it emphasizes that noun. In your sentence, っていうの is used right after the embedded question (a noun) to emphasize it. It doesn't change the meaning of the sentence drastically, but your sentence would look more natural with っていうの. (By the way, this っていうの is interchangeable with っていうこと and ということ.)
Likewise:
- ⸨どこの国の人か⸩で結構変わってくる。
⸨どこの国の人か⸩っていうので結構変わってくる。
It will vary depending on ⸨what country they are from⸩.
This っていうの is optional because どこの国の人か is already a noun (embedded question), but it's a nice-to-have.