The science is still very young, but it's often called "fluid" and "crystallised" intelligence. Fluid is thought to peak at around 25 years old by some people.
It's a really controversial topic that provokes super emotional reactions and a lot of bad debate but it's worth reading about the terminology and studies that have been done.
This article[0] has a header image that summarises the answer to your question
[0] https://examinedexistence.com/the-difference-between-fluid-i...