As with all things we do in fitness, you try to do it a bit better everytime. Always stop short of pain when attempting to reach some new goal. For touching your toes, warm up thoroughly. This means to actually elevate body temperature and the target tissues have been used leading to increased blood perfusion, hydration, and a number of things that I would have to spend all day explaining. Let’s just go with “the muscles are warm and juicy”. This why the current recommendations for improving flexibility are to stretch at the end of a full workout.
Then attempt to touch the toes, stopping when a reasonable tension is felt. Not pain, just a tight feeling in the muscle. Pain will usually have the opposite effet. Pain signals the neuromuscular system that the muscle is too stretched and could be damaged. The result will be the muscle being kept a little shorter to avoid getting over stretched. If this is done regularly and with the correct effort, flexibility will increase over time. But only stretching after some workouts will not be effective. Stretching should be consider the last part of all workouts. Doing otherwise will eventually lead to injury.
Yoga can be helpful in improving flexibility. But only if it is approached in the same manner as above. If you are using yoga to improve flexibility, you should do an activity prior to the yoga to thouroughly warm and move the muscles to be targeted.
Many people don’t take the time to stretch. And there is a foolish “theory” going around that stretching is unnecessary. This will lead to problems afte a while. Since the problems take time, many will think it was some other thing that caused the injury. I can’t change that or those who choose that road. I can only teach people to follow sound stretching methods and use caution when exercising.