I’ve been canning peppers in jars this way for 10 years. A recipe from my grandmother’s notebook!

Clean the peppers from the seeds and stems.
Wash them well.
Cut the peppers into large pieces.
Place them in a large bowl and add the garlic and parsley, chopped finely.
Prepare the marinade.
Mix the water with the vinegar and add the sugar and salt.
Stir well to dissolve the salt and sugar.
Pour the marinade over the peppers.
Cover them and leave them in the refrigerator for 24 hours.
Then put them in a jar.
Seal the jars well with new lids.
Place them in a large saucepan, on the bottom of which we place a towel so that the jars do not break during boiling.
Cover them with water.
Boil for 10 minutes on low heat.
Remove them and turn them upside down until they cool.
Then store in a dark and cool place, for example in a pantry.