Start by washing the cucumbers thoroughly. Slice them into thin rounds or spears, depending on your preference.
In a medium saucepan, combine the vinegar, sugar, water, salt, mustard seeds, dill seeds, celery seeds, and black pepper. Heat over medium heat until the sugar dissolves and the mixture begins to simmer.
Once the mixture is simmering, remove it from heat. If using garlic, add the sliced garlic to the mixture.
In a mixing bowl, place the sliced cucumbers.
Pour the warm vinegar mixture over the cucumbers, ensuring they are fully submerged.
Allow the mixture to cool to room temperature before transferring it to clean glass jars. Seal the jars with lids.
Place the jars in the refrigerator. Let them marinate for at least 24 hours for the best flavor, although they can be enjoyed sooner.