About controlling a dc motor which is 6v with pwm control with an arduino

so i was trying to control motor speed with my arduino so how do i do this and what motor driver should i use? I already have a L298N dual motor driver laying around should i use that?

This module works as a motor driver, but is very power-inefficient. You will only get one 3VDC TT motor (hobby motor) to work well with only 6VDC power supply.

Which motor? Datasheet is prefered.

And what type of Arduino are you using?

You might want to look at this How to get the best out of this forum before you proceed any further.
We only know what you tell us, and without knowing what you have, we don't stand a chance.

And at the moment you are feeding us drip drip information. Not the best way of winning friends here.