Hi and welcome to the site. My name is Dr. C. and I'll be providing your medical information today.
It's not likely that a short spasm like that was related to a miscarriage. It's much more likely that either a ligament pulled or something related to the normal corpus luteum cyst of pregnancy such as a temporary twist or leak.
If you find your self worrying, it would be a good idea to call your doctor and arrange for an ultrasound. If the ultrasound is perfectly normal at 9 weeks, the risk of a miscarriage is extremely low. Usually there are signs earlier on ultrasound of problems even if the miscarriage itself isn't apparent until several weeks later.
I hope this is reassuring. Please REPLY if I can provide more details or clarify anything. I'd like to be sure you have the most helpful information for your situation.