IQ is a human constructed / defined concept in which a person answers various questions under a time limit and they are given a number derived from the way they answered the questions.
If we take some specific IQ test (to hold constant, for consistency), and observe that people get different numbers as they take the test, then I don’t think there can be recourse to a strong law of the universe as to why a “human” could not answer the questions faster or more accurately, except regarding:
- physics
- the definition of a “human”
- the range of numbers the IQ test allows (in its scoring rules)
For example, perhaps it could be argued that in order to add some numbers, there has to be some physical system carrying representations of those numbers and performing an actual physical process - a transformation or a “computation” - to produce the output, their sum. Maybe a neuroscientist would know the maximum speed at which the physical brain is able to carry out such an operation (however it does that). For example, maybe the speed of electricity in the brain, neural actions, or the speed of light, and also taking into account the size of the task (the number of computations needed to obtain the result).
As you suggested about DNA, the possibility that we are not strictly concerned with what kind of thing is doing the test, makes the physical limit described above seem possibly to be relevant to answering the question instead of dismissably ideal. If you wanted to ask specifically about biological forms close in similarity to currently existing ones, it’s still basically the same type of question, just bounding the set of possible “thinking” systems to certain physical types (i.e., brains, with various parameters and constraints on what they’re like).
So, in some way, while a good question, it may have the issue that it is tautologically self-answering, because it depends on how you interpret it, or what you mean. If an IQ test is some test, the theoretical maximum of performance of whatever will be taking the test will simply be by whatever you choose to allow to take the test, in your thought experiment.
The question of a “score” also trivially depends on the scoring conventions of the test itself; so, again, trying to lay down some assumptions to make the question something more concrete and definite and not as flexible, you probably mean something like mental / neural / cerebral capability, where IQ is just meant to be an attempt at observing that.
So the question is more about if there any known physical hard limits to the functioning of “the” brain - which is actually the respective brains of a number of different people. So I think - as you indicated - the real question might be the probability of any particular brain being born, right now, or at some time, given the brains and the DNA of the people living and reproducing at that time. A brain with some aspects like Ramanujan’s might be less common; someone else’s more. At that point, I think we should ask neuroscientists and evolutionary biologists how DNA interplays with the architecture of brains, and try to come up with an estimate for how likely a certain functional substructure with particular “performance” characteristics would be.