I did something Bad & idk what to do

So I was in study hall @ a table with a group of girls (I don’t know) and one of them tells me to hide a phone in my pocket.

I did it and when their friend came back and was looking for it she started getting really freaked and I was about to give it back but the teacher stepped in and told me to give it back.

I feel bad because I kind of just realized the girl was the “easy” friend that her friends pick on and I wanted to apologize but she left the class before I got a chance.

I don’t have any classes w her and I feel really guilty.