Mammals? Some do. Most other animal I can think of right now? Nope, a snake just.. does its “pre-programmed” thing, the same way a spider creates its web. Jellyfish are barely alive, fish are also not particularly intelligent.
People really did believe even just a few hundred years ago that animals were just “animatronics”, and let’s be honest, plenty of animals don’t disprove it too well.