Python 3, 52 47 bytes
thanks to @BMO
f=lambda n,i=1:len({*str(n**i)})>9or 1+f(n,i+1)
Python 3, 52 bytes
lambda n,i=1:len({*str(n**i)})==10 and i or f(n,i+1)
[Try it online!][TIO-jpwkyhgo]
[TIO-jpwkyhgo]: https://tio.run/##JYsxDsIwDEX3nsJsdsjQNEAhUm7CEtQGLBW3ClkQ4uzBEn97@u9t7/pYxbccr21Jz9uUQCxHF5ZZ8GNetaAYw/SlGF0PSSZgWAtkVG3vqGUFBhYoSe4zDhb8SKEDHWd9dhG0C7AVlopstWSirvtzRjf4w/E0ni89UfsB "Python 3 – Try It Online"