What if each character can be a letter (26) OR a digit (10)? Now each position has 36 choices. Total: 36^4 = 1,679,616 passwords.
What if the first character must be a letter, and the rest can be anything? First position: 26 choices. Other three: 36 choices each. Total: 26 × 36^3 = 1,213,056.
You handle constraints by adjusting choices per position. The product rule still applies.