Firstly, evolution has determined the limits of our cognitive functioning.
The range of thoughts we can think is actually limited to things that were useful for our ancestors. For example, if you try to visualize a five-dimensional cube, you’ll find it impossible. This is because the ability to see five-dimensional objects did not provide any evolutionary advantage.
The range of tasks we are adept at is also pretty limited. For instance, we are actually fairly bad at performing large mathematical computations because our ancestors never really needed them as hunter-gatherers. On the other hand, they did need the ability to navigate social problems like detecting and punishing cheaters, so humans today are fairly adept at this.
Secondly, evolution also guides our preferences in matters of taste and attraction.
Most people find things like apples, eggs and potatoes tasty. Why? Because they contain sugars, proteins and vitamins, all of which were useful for our ancestors’ survival.
We also have a strong aversion to even the idea of eating fecal matter. Why? Because it contains harmful microbes that would make us sick, so presumably any ancestors who were drawn to it died out long ago.
If we look at what kind of creatures we’re sexually attracted to, this also tends to make evolutionary sense: we’re not attracted to frogs, but rather other humans. This is because cross-breeding with other species is not possible, so being attracted to them would be pointless from an evolutionary standpoint.