“DWI” is short for “Driving While Intoxicated” and sometimes it’s called a DUI for “driving under the influence.” but what you need to understand is that DWI covers more than just alcohol, and also more than just driving!
You can be charged with a DWI for having a blood alcohol content of 0.08% or higher, OR being under the influence of controlled dangerous substances, OR a combination of any amount of alcohol and even many prescription medications, OR sometimes just prescription medications.
There are some special defenses for the last two, but just having a prescription isn’t always a defense. Also, you don’t even have to be driving, you just have to be ‘operating’ a vehicle. If you have the keys in and the engine on, even in park, THAT is operating a vehicle.