If you have only just found out that you are pregnant, and are still in your first trimester, you are in no way obliged to tell any potential employer that you are in fact expecting. You have a very relevant excuse to keep this fact to yourself. Miscarriages still occur quite frequently in the first twelve weeks of pregnancy, and plenty of women keep their pregnancies to themselves completely at that stage (see why here: Does the risk of miscarriage pass after the first trimester?). If you get the job and your employer then finds out about your pregnancy, they might resent that you did not tell them, and consider it unfair. If that is their reaction, you can probably be sure you would not have landed the job if you had been open about your new pregnancy.
If you are already further along in your pregnancy, in your second or third trimester, you might still be able to get a new job. Being open about your intentions, and coming up with solutions for the maternity leave period can help enormously. One big advantage of an employer that is willing to hire you when you are pregnant is that they are likely to value their employees for their skills, and be family friendly. Perhaps, your pregnancy will turn into the best excuse ever to bring up working part of your job from home! Good luck!