There are synergies between the two kinds of intelligence. The brain serves the genes by improving the organism’s capability to survive and reproduce. In exchange, evolution favors genetic mutations that improve the brain’s innate and learning capacities for each species (this is why some animals are born with the ability to walk while others learn it weeks or months later).
At the same time, the brain comes with tradeoffs. Genes lose some of their control over the behavior of the organism when they relegate their duties to the brain. Sometimes, the brain can go chasing rewards that do not serve the self-replication of the genes (e.g., addiction, suicide). Also, the behavior learned by the brain does not pass on through genes (this is why you didn’t inherit your parents’ knowledge and had to learn language, math, and sports from scratch).
As Lee writes in Birth of Intelligence, “The fact that brain functions can be modified by experience implies that genes do not fully control the brain. However, this does not mean that the brain is completely free from genes, either. If the behaviors selected by the brain prevent the self-replication of its own genes, such brains would be eliminated during evolution. Thus, the brain interacts with the genes bidirectionally.”