The original sentence:
In this way, we have learned all that we know of the laws of astronomy, or of the habits of the social insects, let us say.
Please let me make it simpler as below:
In this way, we have learned all that we know of the laws of astronomy.
In the above sentence, what is modified by "of the laws of astronomy"?
know (of the laws of astronomy)
that (of the laws of astronomy)
that we know of the laws of astronomy [i.e., we know that (of the laws of astronomy)]