Most washing machine motors are mains voltage, and have exposed terminals and connectors.
They are intended to be used inside the cabinet for the protection of the operator.
Electricity, and gears and transmission shafts are VERY DANGEROUS. I do not recommend experimentation by those without formal training and a great deal of practical experience of electrical machinery. THERE IS A FATAL RISK !
Low voltage stuff, say 50v or less, is electrically less dangerous but the mechanical danger is still present, since these motors can be quite powerful, and you could suffer a serious injury, or amputation of a finger for example.
Personally I would recommend use of an electric drill or similar self-contained power unit as more suitable for the diy enthusiast or amateur constructor.
Wherever possible take advice from a professional expert, such as a college tutor, or a local engineering business.