I wrote about relay because my motor is 12v and around 2A because I don't know what transistor to use to implement the switch and the best schema for it so not to get it hot, etc. in terms of a safe design, could you please suggest?
First, you'll want to make sure the transistor is rated above the voltage and current levels it's going to see during operation. In this case I'd say the maximum ratings need to be at least 20 VDC
and 3 A (and really I'd get over 4 A if it's practical). Second, you'll want it packaged so that it's easy to to attach to a heat sink, so you want one with a thermally conductive tab. preferably one that is large with a hole for a fastner some form of TO-220 package fits the bill.
Here's a tutorial
on how to use a MOSFET type of transistor as a switch with an Ardunio and a higher powered device like a DC motor (you could use a BJT as well, but MOSFETs are better suited for these voltage and current levels). The specific transistor used in the tutorial would work in your case (in fact it's rated to handle many times the voltage and current), but as long as you keep in mind the two points I've made above you will be able to select a different one you can safely use.
Edit: Oh and the tutorial I linked to showing a direct connection to the motor, with the transistor switch circuitry on the negative side of the motor (i.e. a low side switch). My original suggestion was to have the transistor switch between the power supply and the L298's input for the +12 VDC
(i.e. a high side switch). Either configuration would work to interrupt the power to the motor when the transistor is closed.