Instinct - an innate, typically fixed pattern of behavior in animals in response to certain stimuli. (I am not saying that all animals or microbes don't think)
No, leaning doesn't require thinking. A bacteria doesn't think (it has no brain). Yet if it keeps running into a "road block" it will change its path. COVID(a virus) isn't thinking, yet it mutates to keep itself alive.