You already know not to use driver.sleep. Now let's talk about the mistake that replaces it, because it appears in almost every Selenium project.
Selenium has two kinds of waiting, and they do not work well together.
An implicit wait is a global setting. You set it once, and every findElement will keep retrying for that long before giving up: