Can't control DC motor with PWM on Raspberry Pi
Black wire on the motor to GND on raspi. Pay attention to the length of the black wire on the motor - if you extend it, then voltage drop might be an issue. In which case it may cause the raspi to fail. A raspi isn’t intended to control things in the real world without protection.