This is my first attempt at electrical engineering, so I'm sorry if this question seems basic, I couldn't seem to find answers anywhere.
I want to wire a 12v motor to an on/off switch and power with a wall plug. I intended this motor to be 18v so that is the power plug I bought, though come to find out after receiving it it is 12v, I firstly want to know if this is safe to power with the wall plug that I currently have.
Secondly, as it is currently connected (positive wire to switch and switch to motor, negative wire directly to motor) the motor runs smoothly when power is first supplied, but then goes on and off how can I prevent this so my motor runs smoothly?
Again, I am completely ignorant of this field and have tried my best to piece together my understanding of everything i'm working with, so please keep that in mind.