Any advice on avoiding minor injuries when sparring/training?

First post here. Have been training for under a year, anyone got any advice on how to avoid it or prevent it?

It's really getting on my nerves, every other training session I seem to get somewhat hurt where the pain/side effects last almost or over a week.

For example, I rolled my foot awkwardly while my partner was performing a takedown on me around 4 weeks ago, It still hasn't healed and hurts when I move my toes. A week ago, during sparring I twisted my left knee, and it still hurts a bit when I'm walking around.

Lastly, just today I was sparring with this purple belt, I was trying to pass his guard I think? I had my arm on the mat, he went to grab it and it twisted awkwardly. He didn't even mean to do that, I heard like popping sounds and It was hurting quite a lot.

I don't know, Is this something that is common for a lot of people, or am I doing something wrong. If so I'd greatly appreciate it If I could get some tips or pointers.

I know that this is a combat sport and it goes without saying that you will get hurt and I really love training, but I genuinely don't know If I can keep on participating like this. After a while I'm certain I'll get hurt much worse.

Also one last thing. Does anyone know any guard passes for beginners? I find that very difficult and whenever I spar, I try to but nothing ever seems to work and I end up getting swept.

Thanks for reading this long winded post I'm grateful for any advice really :)