The Gemara asks this very same question (Megillah 31b):
Abraham said before the Holy One, Blessed be He: Master of the Universe, perhaps, Heaven forbid, the Jewish people will sin before You, and You will do to them as You did to the generation of the Flood and as You did to the generation of the Dispersion, i.e., You will completely destroy them?
Avraham is asking G-d if He will do to the Jewish people if they sin, as what He did to the generation of the Flood. G-d answers with:
No, I will not do that
In Bereishis 15:9, G-d instructs Avraham to bring five different animals for sacrifice:
“Bring Me a three-year-old heifer, a three-year-old she-goat, a three-year-old ram, a turtledove, and a young bird.”
Thus, the Gemara, citing this pasuk in the Torah, explains that G-d suggested to Abraham that even if his descendants will sin, they will be able to achieve atonement through sacrificing offerings.
However, what to do when there is no Holy Temple standing in Yerushalayim? That is the question Avraham asks G-d. The Gemara explains as follows:
Abraham said before Him: Master of the Universe, this works out well when the Temple is standing and offerings can be brought to achieve atonement, but when the Temple will no longer be standing, what will become of them?
So, what to do when there is no Holy Temple standing in Yerushalayim?
G-d said to him: I have already established for them the order of offerings, i.e., the verses of the Torah pertaining to the halakhot of the offerings. Whenever they read those portions, I will deem it as if they sacrificed an offering before Me, and I will pardon them for all of their iniquities.
Similary, the Gemara in for example two places discusses the relationship between Torah study and atonement for sins:
Anyone who engages in Torah study need not bring a burnt offering, nor a sin offering, nor a meal offering, nor a guilt offering (Menachos 110a)
The Gemara (Rosh Hashanah 18a) explains the pasuk in 1 Shmuel 3:14 where it says "Assuredly, I swear concerning the house of Eli that the iniquity of the house of Eli will never be expiated by sacrifice or offering means that through Torah study and acts of kindness, "the sin of Eli's house" is atoned.
Abaye said: With sacrifice or offering the sin of Eli’s house is not atoned, but it is atoned through Torah study and the performance of acts of kindness.
So, according to all the above. The Gemara explains that through Torah study, especially the sections that are speaking about the offerings, are an atonement for sins. However, Teshuva (repentance) can alse be seen as something that brings atonement for someone.
Similary, Hosea says:
For I desire goodness, not sacrifice; Obedience to G-d, rather than burnt offerings
On this pasuk, the Avot d'Rabbi Natan explains:
Once, Rabban [our rabbi] Yohanan ben Zakkai, left Jerusalem, and Rabbi Yehoshua followed after him. And he saw the Holy Temple destroyed. [Rabbi Yehoshua said: Woe to us, for this is destroyed –] the place where all of Israel’s sins are forgiven!2 [Rabbi Yohanan] said to him: My son, do not be distressed, for we have a form of atonement just like it. And what is it? Acts of kindness, as it says (Psalms 89:3), “For I desire kindness, not a well-being offering.” And so we find that Daniel, the precious man, would busy himself with acts of kindness.