Do you have other cats at home then? If she has contact with a male to get pregnant then they may have had a fight or perhaps played too aggressively.
This is most likely a developing abscess from your description.
Generally these occur secondary to a bite or scratch wound that injects bacteria deep into tissue. The original wound may be so small we never notice it and heals quickly. Meanwhile the bacteria deep in the tissue proliferate and lead to discomfort and inflammation, thus the swelling. Eventually the tissue in the area starts to die from the inflammation, pressure and bacteria. When that happens the hair over the area may fall out and an open draining wound can develop. The entire process usually takes about a week to ten days. They seem to blow up overnight once the infection gets established.
Treatment is based upon draining the abscess fully, removing the dead, infected tissue, and starting an oral antibiotic to get rid of the infection. Even though she may be pregnant it is safe to start antibiotics as there are antibiotics that are safe to give to pregnant and nursing queens.
If she's eating and drinking normally and doesn't seem too uncomfortable this doesn't warrant an emergency visit but she should be seen by her veterinarian as soon as possible. Since she doesn't want to eat today ideally she should be seen today and get antiibitics started ASAP.
In the meantime, if she will let you, you can warm compress the area with a clean cloth moistened with very warm/hot water for 10 minutes at a time several times a day. This will hopefully cause the abscess continue to drain which would be best and more comfortable for her.
If she will let you and a wound opens up flush the wound do so with a mix of betadine solution (also called povidine iodine solution and available at the pharmacy over the counter) and warm water (mixed together in a syringe so it looks like weak tea), a couple times a day to keep it open and draining until her exam.
In most cases topical treatment is not sufficient and given she doesn't want to eat she really must be seen by a veterinarian and get oral antibiotics prescribed.
Of course the other concern, depending upon where you are in the UK, is to make sure that her Rabies vaccine is current as this may also be due to a wild animal bite. Current protocol in many places with a wild mammal animal (one that we cannot observe or test for Rabies) bite is to booster the Rabies vaccine as a precaution IF the animal has been vaccinated previously. When we have no idea about vaccines the quarantine protocol is much more involved. If she is pregnant vaccines are generally not given as a safety measure for the kittens.
Rabies is a very slow growing virus. It can take weeks to months for an infected mammal to show neurologic signs (signs due to the virus affecting the brain). If we have a protected/properly vaccinated cat get bitten their immune system recognizes the virus and attacks and kills/immobilizes it before it has a chance to attack their brain/nervous system and the cat should not get sick. By giving a booster vaccine soon after a bite, before the Rabies virus has a chance to do any harm, we stimulate the immune system's "memory" and a protective process starts to form. This ensures that the cat has the best protection, and thereby you and your family are protected too. But if she is current on her vaccines and is pregnant they will likely wait to vaccinate.
In short warm compress the area, keep her quiet and have her examined ASAP to get antibiotics started.
It has been my pleasure to help you today, and I hope that I have earned my 5 star rating. Please remember to rate my service by selecting the 5 stars at the top of the screen (rating me now does not close your question). You are welcome to ask follow up questions about my response here until you are satisfied, simply use the reply box and let me know. Thank you!