Please be very careful with your body right now, even straining too much can feel scary. Drink lots of warm water and talk to your doctor before taking any heavy laxatives, safety is first.
I totally understand how frustrating and uncomfortable this feels, it literally ruins your whole day. Try eating soaked prunes or some papaya if your doctor allows, and please don't stress, this phase will pass.
I asked my senior gynac at the private hospital during my checkup and they strictly told me not to take random over-the-counter syrups. They gave me a safe pregnancy laxative which worked wonders, so better just call your doctor's assistant and ask.
My doctor told me that progesterone hormone slows down our digestion, which is why this happens. She suggested adding psyllium husk (isabgol) with warm water at night and increasing physical movement like walking. It is a slow process but safe and highly effective.
Listen, pregnancy constipation is super common because of hormones. Just start eating 2 fiber-rich apples daily and drink at least 3 liters of water. Also, don't sit on the toilet for too long straining, it causes piles.