That sounds awful for you. 💐
I'm not an expert by any stretch. Just a parent too but I don't want to read and run. You might want to try posting in AIBU for traffic given it's an immediate and worrying time but you may need a hard hat to deal with some of the answers.
Went through something similar with DD when she was around that age. In her case it was made worse by an inhaler she was on for asthma but I think it may really have been due to bullying at school. I didn't realise was as bad as it was until years later which meant we didn't support her enough.
There are a number of things that could be causing it. Some of them would be due to your parenting but please don't think I'm being judgemental. Parenting is hard and it's not possible to get it right. I think being a good parent is honestly doing your best. You asking the question is the most important thing and the sign that you're a good parent.
I noted that you say you've tried talking to him. Is that just about his behaviour? Could you perhaps not be spending enough time with him? Are you really there with him? Too much time on your phone? This is an age where they often go off on their own more and it's easy to fall into the trap of neglecting them a bit. Could it be that whenever you converse it's all you making demands or you telling him off?
Is he being left too much on his own? Kids will act out of they feel bored and ignored.
I found time out on holiday was great. Generally DD was lovely then.
You might find looking up Therapeutic parenting. That's helpful about how you talk to a child when they are misbehaving. It's being careful with what phrases you use when you are tackling behaviour.
It's effective over time but be warned it's really hard to do.
It could be the start of puberty. In which case advice on handling teenagers is what you'll need.
It could be that he's gay and realising it and that can be very frightening for him to deal with including the huge huge worry that your parents won't accept you (even if the parents would clearly be ok about it).
It could be ADHD or a disorder but if have thought there would have been signs longer.
It may be that he's experienced something very traumatic and can't tell you. Don't worry too much about this. It's unlikely to be your fault if there is something. This could include seeing things on line (maybe at school or a friend's house?).
Overall, I'd try largely ignoring the behaviour for a bit and concentrating on doing stuff as a family. Some if this will mean a bit of forcing him to do things he says he doesn't want to or that are childish. Try to involve him in decision making about this and things to do with him. Ask him about his day when you get home. You won't get answers and don't push for them. It's about showing you care enough to ask.
Do you still read to him at night? Lots of people stop this earlier than 9. I heard somewhere that reading until 12 is a good thing. It does give a quiet time when you spend time together concentrating on something together that's emotionally simple.
Reinstating it can be difficult but if he's the right sort of kid you might be able to find a difficult book (lord of the rings?) to use as an excuse.
Sorry if none of this is helpful. The advice comes from having been guilty of most of the above at some point or other.