You could be dealing with a gifted child, perhaps even a so-called "twice exceptional" child. See, for example, the book: Jan Davidson, Bob Davidson, and Laura Vanderkam (2005) "Genius Denied":
There are tests for certain aspects of intelligence, for example WISC-V, the most recent among the WISC tests, or WPPSI. Gifted children could be hard to identify. Gifted kids are often bored in regular schools and, oddly enough, underperform, compared to average kids.
There are other numerous sources online that can help caretakers of gifted children, see below. There are also psychologists (specifically, neuropsychologists) trained in identifying and helping gifted children. They can administer tests such as WISC for a moderate fee. Some countries, as well as some states within the US have state-funded programs for gifted children. Other countries and states have less public resources for gifted children, often none.
Private schools or tutors could be an alternative, especially in places that have zero public options. Be aware that the gifted children topic in general may have certain negative emotional associations in the public discourse: a quick search for
gifted children elitism fetched 536,000 results on Google, about a third of what
rich children elitism search fetched (1,750,000), as of the time of this writing.
National Association for Gifted Children: Resources for Parents: http://www.nagc.org/resources-publications/resources-parents
Davidson Gifted Database - articles, resources and state policy pages to help students, parents and educators pinpoint gifted information: http://www.davidsongifted.org/search-database
Davidson Gifted Database: Support for Gifted Programs vary greatly from state to state: http://www.davidsongifted.org/search-database/entrytype/3
The term twice exceptional, often abbreviated as 2e, [...] refers to gifted children who have some form of disability: https://en.wikipedia.org/wiki/Twice_exceptional
7 Myths About Twice-Exceptional (2E) Students, by Amanda Morin: https://www.understood.org/en/friends-feelings/empowering-your-child/building-on-strengths/7-myths-about-twice-exceptional-2e-students
Gifted education - Wikipedia: https://en.wikipedia.org/wiki/Gifted_education
Wechsler Intelligence Scale for Children (WISC) - intelligence test for children between the ages of 6 and 16. The Fifth Edition (WISC-V; Wechsler, 2014) is the most recent version. [...] Children ages two years and six months to seven years and seven months are tested with the Wechsler Preschool and Primary Scale of Intelligence (WPPSI). https://en.m.wikipedia.org/wiki/Wechsler_Intelligence_Scale_for_Children
List of gifted and talented programs is a list of gifted education programs located all across the world - Wikipedia (Note: some programs are missing on this page, but it is a good starting place):