There are a myriad of exercises a person can do when one body part is injured. Since you are injured on the bottom part, start at the top with neck stretches and strengtheners. Then consider exercises for shoulders. You can start there with simple shoulder rolls. For arms, you can stand and put your arms out to the sides. Now move them for four minutes without a rest. That is hard! Consider exercises for biceps, triceps, back and chest. Light or medium heavy weights can help. Be sure to stretch everywhere you are able.
Can you lie on your side and do "side-line" exercises for your thighs by lifting your leg up and down? How about doing exercises for your core? There must be 50 or more ways to strengthen the core. Start by lying on your back. Can you do a variety of types of sit-ups?
Can you roll your ankle? Then strengthen your ankles. Can you do calf raises, or is that too engaging for hamstrings?
Are you allowed to do gentle stretches for your hamstring while it heals? Can you bend over and touch your toes or is that too much?
Can you swim? It requires a pool, suit, interest and some ability in the sport so may not be an option for you.
My girlfriend and fitness instructor broke her fibia near her ankle. She did not miss one class which meets thrice weekly. With her cast she used every other body part.
You get the idea. Do what you can, as you can, when you can. There are many exercises you can still do while injured. Go for it!