Before generating combinations, you can count them using the product rule. For input "23": digit 2 has 3 letters, digit 3 has 3 letters. Product: combinations.
For input "234": combinations. Each digit contributes independently.
This tells you the time complexity before you write any code. If the count is too large, you know generation will be expensive.