In addition to reiterating what has already been said (Though the input is correct; your coach will likely be able to give the best input.) I'm going to try to actually answer the question.
When you say "very amateur" I think you don't actually understand what the word "amateur" means, and may not be in a coaching situation. If that's the case, then you really should be much more careful in training situations, as injuries could always be more serious.
It isn't entirely clear to me what you did. There are a number of possibilities, and your description is pretty vague. If you were just applying pressure straight to the throat in something like a paper cutter choke and your partner was trying to fight that with a bridge, then the risk of neck injuries is pretty high. If your opponent was trying to bridge and wound up in a wrapped choke, like a north/south choke or a guillotine, then that'd be weird (though I suppose not impossible) and would likely still increase the risk of neck injuries.
Yesterday me and my friend were grappling and i basically had his race pressed against my right knee (he was to my right) and i wrapped my right arm around the back of his neck and into the back of my left elbow like a choke but backwards. His neck was like a bridge, and on one end was his head against my knee, and the other end was his chest against my right shoulder, and my right arm was like putting weight on that bridge. After not even applying that much pressure he got injured somehow and was in agony for a few minutes. He was yelling and i thought i messed up his neck somehow, but i there was no clicking or cracking sounds that we noticed. I remembered that i have never seen fighters in the ufc or any professional fights that i have witnessed wrap and arm around the back of the neck and create a chocking position but facing them instead of being behind them. I looked in the ufc foul rules and could not see any rule specifically against it. My friend and i are very much amateur fighters so could anyone tell me if this is something that is illegal in tournaments or something that should never ever be done? I have no idea but it seems pretty dangerous. Can anyone out there give me some information or advice?
There's a reason that a grappling coach (who's any good) will not just teach you to unilaterally bridge on your head while in side control. The reason is that an bridge does put a lot of strain on the neck and can cause injury if additional pressure is added. Moreover, bridges can be countered in ways that are not exactly desirable for the bottom guy.
My advice is always to seek the advice of a grappling coach who can work with you on this stuff. Someone who can see the weird stuff you're doing is going to be way more helpful than I can be over the internet. That said, I recommend that you and your friend attempt to learn a lot more about attempting side control escapes, since that sounds like it was likely the source of this particular injury.