Understanding the origin and mysteries of the physical world is considered an unconjecturable or imponderable, and it doesn't help with ending suffering, as you already know.
"Conjecture about [the origin, etc., of] the world is an
unconjecturable that is not to be conjectured about, that would bring
madness & vexation to anyone who conjectured about it.
AN 4.77
Was the Buddha omniscient and knew everything? No. He definitely knew and understood everything related to the Dhamma (the teachings), but he did not know everything simultaneously.
The Buddha stated that it is not possible to be all-knowing all at once.
That means it is possible for the Buddha to know and understand all things if he tried to learn it, but not simultaneously. This means he has the capacity (the intelligence) to know all things, but it doesn't mean that he indeed knew all things.
Also please see Buddha's omniscience.
“Sir, I have heard this: ‘The ascetic Gotama claims to be all-knowing
and all-seeing, to know and see everything without exception, thus:
“Knowledge and vision are constantly and continually present to me,
while walking, standing, sleeping, and waking.”’ I trust that those
who say this repeat what the Buddha has said, and do not misrepresent
him with an untruth? Is their explanation in line with the teaching?
Are there any legitimate grounds for rebuke and criticism?”
“Vaccha, those who say this do not repeat what I have said. They
misrepresent me with what is false and untrue.”
“So how should we answer so as to repeat what the Buddha has said, and
not misrepresent him with an untruth? How should we explain in line
with his teaching, with no legitimate grounds for rebuke and
criticism?”
“‘The ascetic Gotama has the three knowledges.’ Answering like this
you would repeat what I have said, and not misrepresent me with an
untruth. You would explain in line with my teaching, and there would
be no legitimate grounds for rebuke and criticism.
MN 71
Then the king said to the Buddha, “I have heard, sir, that the ascetic
Gotama says this: ‘There is no ascetic or brahmin who will claim to be
all-knowing and all-seeing, to know and see everything without
exception: that is not possible.’ Do those who say this repeat what
the Buddha has said, and not misrepresent him with an untruth? Is
their explanation in line with the teaching? Are there any legitimate
grounds for rebuke and criticism?”
“Great king, those who say this do not repeat what I have said. They
misrepresent me with what is false and untrue.” .....
Then the king said to the Buddha, “Sir, might the Buddha have spoken
in reference to one thing, but that person believed it was something
else? How then do you recall making this statement?”
“Great king, I recall making this statement: ‘There is no ascetic or
brahmin who knows all and sees all simultaneously: that is not
possible.’”
“What the Buddha says appears reasonable.
MN 90
Sandaka, take a certain teacher who claims to be all-knowing and
all-seeing, to know and see everything without exception, thus:
‘Knowledge and vision are constantly and continually present to me,
while walking, standing, sleeping, and waking.’ He enters an empty
house; he gets no almsfood; a dog bites him; he encounters a wild
elephant, a wild horse, and a wild cow; he asks the name and clan of a
woman or man; he asks the name and path to a village or town. When
asked, ‘Why is this?’ he answers: ‘I had to enter an empty house,
that’s why I entered it. I had to get no almsfood, that’s why I got
none. I had to get bitten by a dog, that’s why I was bitten. I had to
encounter a wild elephant, a wild horse, and a wild cow, that’s why I
encountered them. I had to ask the name and clan of a woman or man,
that’s why I asked. I had to ask the name and path to a village or
town, that’s why I asked.’
A sensible person reflects on this matter in this way: ‘This teacher
makes such a claim, but he answers in such a way. This spiritual life
is unreliable.’ Realizing this, they leave disappointed.
MN 76