If you're talking about 6-digit numbers in base 10 (so there digits are one of the numbers 0-9), such a number can be made up of either
• two 1s and four 0s, or
• one 2 and five 0s
and the leading digit must be non-zero.
If such a number starts with 1, then there are 5 slots which can contain the other 1. So there are 5 numbers in this group.
If such a number starts with 2, the rest are 0s. So there is 1 number in this group.
Then there are only 6 numbers with 6 digits whose digital sum is 2.
110000
101000
100100
100010
100001
200000