All containers should be sterilized before being filled with food that’s meant to store anything moist. I’m quite happy to use one straight out of the dishwasher, something I’ve been doing for years with no problems.
However, you can “properly” sterilize your containers by washing them in hot soapy water and rinsing well. Then dry them in a cool oven (140C) while you prepare whatever food you’re making. At the very least, give your jars 15 minutes in the oven. For hot fillings, the jars are best filled while they’re still warm to prevent cracking.