The leading digit carries a restriction, so choose it first. It cannot be 0, which leaves 9 choices from 1 through 9.
The remaining three positions may use 0, but not any digit already used. After the leading digit, 9 digits remain (the ten digits minus the one used), then 8, then 7.
9×9×8×7=4,536
The value P(10,4)=5,040 ignores the leading-zero rule and so counts strings such as 0123, which are not 4-digit numbers.