How to reuse 4 and 6 wires stepper motors for your projects

When you start to create a CNC or something similar you need a stepper motor, probably you can find they inside your trash.
It’s important to understand the stepper motor color code for 4 and 6 wire type.