I think the most important thing you said was at the very beginning of this whole thread.
You said you don't have friends. Why is that?
It is not abuse to restrict your daughter's screen time. That is absolutely the very first thing to be addressed. What does she enjoy that's NOT on a screen? Can she do an hour of that, per day? Can she use screens only in shared living areas of the household, not isolated in her room? Your husband will need to back you up on this, and that brings me to my final question.
Are there addiction, substance use, alcoholism, severe overeating issues in your home, either in yourself or your husband? To me, that would explain his sudden snap in his treatment of her. It would also explain her terrible behavior overall, and even stomach pains as well. The body keeps the score.
Work on yourself, the counseling etc that others have suggested, and the behavior of the others in your household will follow. (Not easily. Not quickly. Not overnight.) Work on your marriage; if you're asking yourself "Should I stay or should I go?" or "Why does he do that?", boy does Lundy Bancroft have a book or two for YOU. Your daughter's entire attitude is a reflection of the dysfunction in the home. Don't focus or worry so much about her, aside from, with counseling, setting a few parental boundaries; instead, address the dysfunction in yourself, and between you and your husband, and the two of you in the way you parent your daughter, and her behavior may follow suit if you are ultimately healthier.