This is my circuit and I am using a 1N4004 diode.
I think the circuit is the problem as the code is very simple and when I tried the same code with an Arduino UNO the motor worked just fine.
That's a Fritzing, a coloured bird nest picture, a toy picture. Please use
real, properly drawn schematics. Schematics show what transistor You use and how it's connected.
Thanks, well done.
The vibro motor supply should connect its negative to GND and positive, via a resistor, as @ LarryD says, to the positive of the power supply.
4 kOhm is maybe a bit too much. Try some 270 Ohm. That brings more power to the motor.
Please use autoformat, Ctrl + T in the IDE. Then copy, click the code tag symbol, </> and paste into the reply.