I am guessing that for the oscillating method you also had to measure the period. How accurately did you measure that? What did you use? Depending on what you used, either method could be accurate than the other. For example, a photogate is more accurate than the timer app on your smartphone for timing oscillations; a transit level is more accurate than a meter stickr for measuring distances. Only you can estimate the accuracy what you did because you were there and I was not.
A crude way to do that would be to say something like, "I measured the length to be 10.3 cm, but it could be as little as 10.1 or as big as 10.5 because of parallax effects and because couldn't exactly gauge where the beginning and the end of the length was." Now that you have these brackets, recalculate the spring constant using the low and high value for x to find a high and low value for the spring constant. Then do the same type thing for the time measurement considering how you did it. See if there is a overlap of the values measured by the two methods.