Regards your question in stopping contact with these people here is my suggestions before giving phone:
Use current phone to check browsing history and make a list of websites where she talks to these people - the accounts need deleted, ask tech friend or chatgpt for step by step instructions.
Go through emails and list anything about "new message received" or "your account" in relation to any websites - these accoumts need deleted.
Once you have deleted all accounts from your list ensure you have gmail or icloud login details and are able to login via laptop on an incognito window - if you can great.
Now factory reset the phone, when its acting like a new phone wanting you to set it up, delete the gmail or icloud sccount via laptop. At this point all tech sccounts are gone, this is good.
Next remove the sim card and contact the provider to cancel the account or change number/new sim card. Ideally take this as an opportunity to cancel provider if you can but i understand you may be in contract, but ideally a clean break to a new provider with new sim, maybe pay as you go might be easier in the short term as no contract.
So lets say its android. You can defintly setup any android to block every website as standard and each one she would have to ask your approval so Id be confident to say she will definitly not be able to communicate vis websites at all and same for apps, block everything and make it you have to approve each one.
So she will have a phone with new gmail, new number, no access to websites and no access to apps.
This all possible 100% with family link.
The only risk i forsee is friends giving out her number to these creeps as texting and calls could potentially not be blocked depending on phone make and model. This is where smartphone free childhood could help as there are phones that have deeper controls to really restrict outgoing and incoming calls and texts, so if you had one of those, with full control over contacts, outgoing and incoming calls - then yes it would be possible to fully restrict every form of contact on the phone.
But its not simple process, as above theres many pieces of the puzzle.
The fact she is saying she will just contact them...I dont think thats good. My dh colleague, had a dd who was in similar situation and ended up in court along with other girls from same school as it'd been a local creepy guy messaging them and they all had to give statements or however court works, Im not sure. But very stressful for the family and i remeber the parents werent allowed in the court wuth their dd and it was just a huge stress.
With her attitude of fighting you. Id be inclined to see if you could contact smartphone free childhood for phone suggestions. Id probably sell the pc-but have it factory reset before sale and same delete sll associayed accounts, not as punishment but as its too much of a risk to control especially if your not tech savvy and I dont mean that rudeky, its just yoo bog of a risk.
Im sorry that your dealing with all this, she doesnt sound responsible enough for tech access tbh, not risk aware enough imo.
I have always had tightest parental controls with dcs, explaining from young age theyre like shields i put around them to protect them and its fairly collaborative chats over the years and weve had many discussions about strangers and risks, scenarios and the general why of it all.
But your dd is actively going against you and thats very very difficult for you.
Until she changes her attitude maybe the only tech she is responsible enough for is a playstation with full parental controls and role playing games like Hogwarts, wherethere is zero risk.
If she's not going to work with you and not recognising risks, and going to act like a petulant 10 year old, then maybe you just need to treat her like one?