1. water closet [Longman Dictionary]

noun [ C usually singular ] uk ​ /ˈwɔː.tə ˌklɒz.ɪt/ us ​ /ˈwɑː.t̬ɚ ˌklɑː.zɪt/
[old-fashioned] a toilet

2. water closet [Cambridge Dictionary​
full form of WC: a toilet, or a room containing a toilet
=================================
I looked up the word 'water closet' in the dictionaries.
What does 'closet' mean in 'water closet'? Does 'closet' mean 'a room' or ' a toilet bowl'?
If 'water closet' means 'toilet', 'closet' could mean the toilet bowl. If 'water closet' is 'a room with a toilet', 'closet' could mean the room. Don't you think so?

It means the room that contains the toilet. We answered this before, didn't we? It does not mean the bowl.

The Oxford dictionary does define it as the toilet itself. A closet is usually a small room or wardrobe, someplace that is secret, not public. It signifies privacy. "The conversation was held in the closet", meaning in secret. A homosexual may be "in the closet" if he/she does not want his/her sexual orientation revealed to the public.

https://en.oxforddictionaries.com/definition/water_closet

https://en.oxforddictionaries.com/definition/closet

In the term "water closet," the word "closet" refers to a small room or enclosure where a toilet is located rather than the toilet bowl itself.

To clarify, a "water closet" is an old-fashioned term for a toilet. It refers to a small room or compartment that contains a toilet, often with a door for privacy. The term originated from the use of water to flush waste, distinguishing it from earlier types of toilets which did not have a water-based flushing mechanism.

So, when you see the term "water closet," it generally means a room with a toilet rather than just the toilet bowl itself. However, it's worth noting that the term "water closet" is now less commonly used, and in modern language, we usually just say "toilet" or "bathroom."