When I shoot lightning, I use a long-ish shutter speed and just let the camera run on the intervalometer. My camera has that built in, others may need it as part of an external wired remote. What it does is let me program an interval between shutter trips and the number of trips. I'll set the camera up on a tripod, turn off auto-focus and use Live View to manually focus on something in the distance, I'll start with
f:8 and ISO 100 and when I get some hits I check them out on the screen and adjust exposure up or down as needed. If the bolts I see are sharp but seem dim, then I open up the aperture or raise the ISO. If I'm getting a blasted from with washed-out white, then I'll cut back on the exposure. I've got shots ranging from wide-open at
f:3.5 to clamped right down at
f:22.
As for shutter speed, I'll set anywhere from 13 to 25 seconds, and set the intervalometer for one second more than the shutter time, so the shutter remains open most of the time. turn off long-exposure noise filtering, which freezes the camera after long exposure while it takes a shutter-closed dark exposure of the same duration. This stuff about using a quarter of a second, or a tenth, is frankly just silly. at night, keep the shutter open as long as you can keep it, then open it again immediately. There's nothing out there to over-expose, and the lightning will only be affected by ISO and aperture.
Regardless, you want the camera on a tripod, and you want to use long shutters, unless you're shooting in daylight. (Don't try to us an ND filter to get long shutters in daylight, because the ND filter cuts the lightning just as much as it cuts the daylight, which is not useful. That's come up before, someone asking why his daylight lightning was so disappointing.....

) Trying to do it handheld and hitting the button when you see a flash is not going to be very successful. if you don't have an intervalometer, just mash the button every time it's ready.