getting pictures of lightning is HARD, yo
Which is why you hold the shutter open for longer than usual. Some of these were probably open for 1-3 minutes.
Most cameras have a timer setting on them. You can even get some for your smart phone. The hard part is holding it sill long enough not to mess up the picture. Tripods and cement work really well