the Chinese vs Chinese

my grammar book says that we can use “the” with nationalities to mean the people of that country in general. My question is - we can or we have to use it this way? For instance, are these pairs of sentences synonymous and correct?

The Chinese invented printing.
Chinese invented printing.

The Italians invented the pizza.
Italians invented the pizza

Best regards!

The meanings would probably be interpreted as the same, but ‘the’ is clearer:

The Chinese invented printing.-- that nationality
Chinese invented printing. – some unspecified members of the society
The Italians invented the pizza.-- that nationality
Italians invented the pizza-- some unspecified members of the society

So is it more natural to use “the” before nationalities in sentences such as above?