I assume we are discussing Uttanasana? I’ve specifically selected this image since it conveys what I am about to share.
When the student does not have (enough) opening in the hamstrings AND attempts Uttanasana with the legs remaining straight, the depth of the pose unfortunately comes from a “bending” in the spine (as pictured). For the purposes of Yoga this does not facilitate integrity in the posture. Instead it compress the front of the spine while opening (only) the back and it agitates the nervous system. In asana the short side is lengthened without shortening the long side
If the choice is between bending your knees in the pose (and still working powerfully without aggression) or rounding your spine as in the photo, it will be more physiologically helpful to flex the knees. When the knees are flexed so, the action of gently lifting the sitting bones toward the ceiling will lengthen the hamstrings.
This will be accessible to you as a student assuming several things; the work in Supta Padangusthasana is done with alignment, appropriate actions and done twice per day, the student’s mind is appropriately placed in the muscle when doing, the diet does not continue to add foods which create inflammation in the tissue, and the emotions of fear in moving forward in one’s life are effectively addressed.
While the path of yoga does have some relatively immediate results, the system is designed for continued practice over time. And the results from that level of tapas (doing) and commitment are too numerous to list.