Yes. Certain phylisophical/theoretical questions are not allowed:
- What was before the world was created?
- What will be after the world ceases to exists?
- What is beyond the edge of the universe?
It's an explicit Mishna in Chagiga (Ch. 2 Mishna 1)
וכל המסתכל בארבעה דברים, רתוי לו כאילו לא בא לעולם--מה למעלן, מה למטן, מה לפנים, מה לאחור. .
One who looks into 4 subjects would have been better off had he not been born: What's above, what's below, what was before and what will be after.
The גמרא in Chagiga (11b) sources this:
יכול ישאל אדם קודם שנברא העולם ת"ל (דברים ד) למן היום אשר ברא אלהים
אדם על הארץ יכול לא ישאל אדם מששת ימי בראשית ת"ל לימים ראשונים אשר היו
לפניך יכול ישאל אדם מה למעלה ומה למטה מה לפנים ומה לאחור ת"ל (דברים ד)
ולמקצה השמים ועד קצה השמים מלמקצה השמים ועד קצה השמים אתה שואל ואין
אתה שואל מה למעלה מה למטה מה לפנים מה לאחור
Maybe a person can discuss what was before the world was created? No, the Pasuk says "from the day Gcd created people".
If so, maybe the 6 days of creation should not be discussed? No, the Pasuk says "from the first days before you existed".
If so, maybe one can discuss what's above, below, before and after? No, the Pasuk says "from the edge of the universe to the edge of the universe"; but what is beyond those boundaries is prohibited.
The Rambam discusses this in הלכות עבודה זרה פרק ב (translation from here)
The worship of false gods is not the only subject to which we are
forbidden to pay attention; rather, we are warned not to consider any
thought which will cause us to uproot one of the fundamentals of the
Torah. We should not turn our minds to these matters, think about
them, or be drawn after the thoughts of our hearts.
In general, people have limited powers of understanding, and not all
minds are capable of appreciating the truth in its fullness.
[Accordingly,] were a person to follow the thoughts of his heart, it
is possible that he would destroy the world because of his limited
What is implied? There are times when a person will stray after star
worship, and times when he will wonder about God's oneness: Perhaps He
is one, perhaps He is not? [He might also wonder:] What exists above,
[in the heavenly realms]? What exists below [them]? What was before
time? What will be after time? Similarly, [one might wonder about]
prophecy: Perhaps it is true, perhaps it is not? And [one may also
wonder] about the Torah: Perhaps it emanates from God, perhaps it does
Since he may not know the guidelines with which to evaluate [ideas
that will lead him] to the truth in its fullness, he may come to
heresy. The Torah has warned about this matter, saying [Numbers
15:39]: "Do not stray after your hearts and eyes, which have led you
to immorality" - i.e., each one of you should not follow his limited
powers of understanding and think that he has comprehended the truth.