@Utkarsh What about 2 digit numbers?
You can say that's 100. But this 100 includes 10 1-digit numbers(0 through 9) and 90 2-digit numbers(10 to 99).
So, when you say n-digit number. $10^n$ will include 1-digit numbers, 2- digit numbers ...., n-digit numbers.
In the question you fixed the digits to be n.