Op I am going to get flamed for saying this but I wouldn’t worry too much as long as this is a phase and not a permanent situation.
Obviously if she is not meeting any friends at all, and not washing or eating, then that is an indicator that she is suffering from depression; as is shouting at you (not acceptable) and she needs help from a licensed psychologist who treats adolescents.
If she is eating and her personal hygiene is ok and she seems reasonably ok in herself, then it’s perfectly normal for a teen to go through a phase of being in their room which serves as a cocoon in which they “pupate” and emerge on the path to becoming adult with individual and separate tastes, likes, dislikes and characteristics to their parents.
To an extent a teen has to separate themselves off and reject their parents values and way of life, in order to individuate. Their bedroom is a safe staging post on that route, I would far rather have a teen of that age at home in their bedroom where you know they are safe, than off and about, sleeping at friends houses, to the extent that they are never home! Just keep an eye on their internet use and what is happening there,
And of course a teen dreams of independence and freedom but they don’t yet have the wisdom, courage, maturity, financial stability and life experience to live alone. So their bedroom is their half-way house in the meantime which allows them privacy, a sense of independence, a version of being in control, and a refuge from all of their worries, insecurities and pressures.
Having said all of that, I would insist on attendance at family meals at the table and confiscate phones at night. They should have a few household responsibilities too like walking the dog if you have one and try and tempt them outside to help you with errands, preferably in the car so you can sit side by side without her having to face you, and you can chat. Stop off for junk food and make each expedition fun so you keep that connection going. Life is hard as a teen girl nowadays. So many expectations on them.
Keep all lines of communication open and check in occasionally with hot chocolate and cake! Make sure they have their ideas straight about relations with friends of both sexes, of boundaries, consent and generally keep mentioning how the internet presents a skewed reality, and how we tend to compare ourselves with something that is falsely curated.
If you have a partner or husband, can they tempt her out swimming, or on a bike ride or doing something a bit adventurous?
If she is anything like my DDs, this is just a phase, and the next phase is them being off and out with friends, on adventures, travelling etc, off to university, and you hardly see them at all! And you wish they were back in their bedrooms! 😄
So try not to worry unless you sense there is something seriously wrong and you will have a better idea about that than any of us!
If I recall correctly, one of Lisa Damour’s books on raising teen girls, I think it is called Untangled, has a check-list at the back on what is “normal” teen angst v what should set the alarm bells ringing, She has written several books though so not quite sure. It’s a bit American if you are in the UK op, but I recommend her podcasts and content generally.
Good luck! Even when teens are at their snottiest, keep telling them that you love them, because they need to hear it at this age!