The wrong running shoes or an improper position on your bicycle will lead to injury very quickly. Learn a simple 5-minute stretch routine that you enjoy. It may come as a surprise to you, but only stretch warm muscles and stretch each day if possible. Consistency is crucial. It will warn you of looming injuries via muscular twinges, extreme soreness, tightness etc.
Muscular soreness is usually a result of inflammation.
Try using ice, especially after training. Waiting until after you are injured is too late. Warm up and warm down.