The brain fog is real, and the tough part is there's not much you can do to make it go away completely - it's hormonal and it just happens. What won't help is beating yourself up about it or trying to "push through" with willpower. Your brain is literally working differently right now, so don't expect to perform like you normally do.
Most people find it doesn't get dramatically better as pregnancy goes on. Some say it even gets worse toward the end when you're exhausted and uncomfortable. The good news is it usually starts clearing up in the weeks after birth, though sleep deprivation can make that feel like it's still there for a bit. The real improvement tends to come once your body settles back to normal hormones and you're actually getting decent sleep again - could be a few weeks, could be a couple months depending on how things go.
One thing that actually helps more than people realize: write everything down the second you think of it, but not in a regular to-do list. Use your phone's voice memo to just dump thoughts immediately - talking it out is faster than typing when you're mid-fog and your brain shuts down. I've found that getting stuff out of your head onto a recording means you don't have to hold onto it, which frees up mental space for the moment. Also, give yourself permission to ask colleagues to remind you about things or to repeat themselves. Most people are way more understanding about this stuff than you'd think once they know what's going on.