Thank you for posting on the forum. The rules for giving up work voluntarily and claiming benefits can be complex and we would advise to get some specialist advice before making the decision. You can call our free helpline and speak to one of our advisers about your situation. https://www.gingerbread.org.uk/what-we-do/contact-us/helpline/
Yes with a child of that age you can opt to be a sahm and they cannot question it. You’d be entitled to uc.
bear in mind that there’s a five week waiting period for us payments from applying the first time. And if this overlapped with wages you earned being paid out you’d receive a different amount to the next month.
Off the top of my head if not claiming housing costs with one child you’d receive about £520-30 a month.
You may well find that remaining in work and claiming gets you into a much healthier position.