Over medium heat, toast the mustard seeds in a large saucepan. Cook until fragrant, about 2 minutes.
Peel and smash or roughly chop the garlic cloves.
Add the water, vinegar, sugar, garlic, red pepper flakes, bay leaves, and salt to the pot. Simmer for 10 minutes.
While simmering, cut your cucumbers in your desired shape. Make sure spears fit inside the jar (cut off an end if not).
Remove from the heat. Add the cucumbers and onion to the liquid and let cool to room temperature, approximately 1 hour. (If you want crunchier pickles, let the liquid cool BEFORE adding the pickles so the heat does not cook them).
Put the pickles and brine in mason jars or another seal-able container, making sure the pickles are submerged. Keep chilled, ideally for at least 10 hours before eating. Pickles can last up to two weeks.
Notes
This made enough to fill approximately three pint sized mason jars. The volume will vary with the shape of your cucumbers and what you can fit in a jar.Try to find cucumbers that are just long enough to fit in the jar if you want spears. But if they are too long, you can chop off one of the ends for them to fit as spears.Add more pickles to the same brine to keep the pickle supply going! You may need to add more garlic to lift the flavors as time goes on.Want a stronger onion flavor? Add them when simmering the garlic and spices in step 3.