It sounds like you are experiencing quite a lot of pain! Overall, the best thing to do in this situation is to see your primary care physician
right away. From your description, it sounds like you probably developed a severe muscle strain
with your initial injury moving the box in the shed. Muscle strains or pulls of the intercostal muscles between the ribs can be incredibly painful. Moreover, with the pain from the initial injury, you were likely walking and moving in a way to try and minimize moving that part of your body--which then makes you prone to develop an injury elsewhere because of muscle imbalance. This may have been what happened when you stretched again to grab your dog. Again, the best thing to do in this situation is to see your primary care physician right away. It will be important to make sure that you don't have any evidence on physical exam of a more serious injury that would require different intervention. However, if your doctor
is able to speak with you and examine you and it appears that you do have a severe muscle strain or pull, then physical therapy and a course of anti-inflammatory medication can be very, very effective to not only relieve your symptoms but also try and make sure that you don't develop this again. Hopefully you'll be back to baseline soon!