Garbha Upanishad mentioned a shloka about when the soul enters the fetus, and according to that shloka, it enters in the seventh month. Here is the complete shloka:
सप्तमे मासे जीवेन संयुक्तो भवति |
अष्टमे मासे सर्व संपुर्णो भवति ||2||
सप्तमे मासे जीवेन संयुक्तो भवति |
अष्टमे मासे सर्व संपुर्णो भवति ||2||