We are afraid of death because our Bible isn't completely convinced that there is a World to Come.
Ecclesiastes 3:16-22
וְע֥וֹד רָאִ֖יתִי תַּ֣חַת הַשָּׁ֑מֶשׁ מְק֤וֹם הַמִּשְׁפָּט֙ שָׁ֣מָּה
הָרֶ֔שַׁע וּמְק֥וֹם הַצֶּ֖דֶק שָׁ֥מָּה הָרָֽשַׁע׃
And, indeed, I have observed under the sun: Alongside justice there is
wickedness, Alongside righteousness there is wickedness.
אָמַ֤רְתִּֽי אֲנִי֙ בְּלִבִּ֔י אֶת־הַצַּדִּיק֙ וְאֶת־הָ֣רָשָׁ֔ע
יִשְׁפֹּ֖ט הָאֱלֹהִ֑ים כִּי־עֵ֣ת לְכׇל־חֵ֔פֶץ וְעַ֥ל
כׇּל־הַֽמַּעֲשֶׂ֖ה שָֽׁם׃
I mused: “God will doom both righteous and wicked, for there is a
time for every experience and for every happening.”
אָמַ֤רְתִּֽי
אֲנִי֙ בְּלִבִּ֔י עַל־דִּבְרַת֙ בְּנֵ֣י הָאָדָ֔ם לְבָרָ֖ם הָאֱלֹהִ֑ים
וְלִרְא֕וֹת שְׁהֶם־בְּהֵמָ֥ה הֵ֖מָּה לָהֶֽם׃
So I decided, as regards men, to dissociate them [from] the divine
beings and to face the fact that they are beasts.
כִּי֩ מִקְרֶ֨ה בְֽנֵי־הָאָדָ֜ם וּמִקְרֶ֣ה הַבְּהֵמָ֗ה וּמִקְרֶ֤ה
אֶחָד֙ לָהֶ֔ם כְּמ֥וֹת זֶה֙ כֵּ֣ן מ֣וֹת זֶ֔ה וְר֥וּחַ אֶחָ֖ד לַכֹּ֑ל
וּמוֹתַ֨ר הָאָדָ֤ם מִן־הַבְּהֵמָה֙ אָ֔יִן כִּ֥י הַכֹּ֖ל הָֽבֶל׃
For in respect of the fate of man and the fate of beast, they have one
and the same fate: as the one dies so dies the other, and both have
the same lifebreath; man has no superiority over beast, since both
amount to nothing.
הַכֹּ֥ל הוֹלֵ֖ךְ אֶל־מָק֣וֹם אֶחָ֑ד הַכֹּל֙
הָיָ֣ה מִן־הֶֽעָפָ֔ר וְהַכֹּ֖ל שָׁ֥ב אֶל־הֶעָפָֽר׃
Both go to the same place; both came from dust and both return to
dust.
מִ֣י יוֹדֵ֗עַ ר֚וּחַ בְּנֵ֣י הָאָדָ֔ם הָעֹלָ֥ה הִ֖יא לְמָ֑עְלָה
וְר֙וּחַ֙ הַבְּהֵמָ֔ה הַיֹּרֶ֥דֶת הִ֖יא לְמַ֥טָּה לָאָֽרֶץ׃
Who knows if a man’s lifebreath does rise upward and if a beast’s
breath does sink down into the earth?
וְרָאִ֗יתִי כִּ֣י אֵ֥ין טוֹב֙ מֵאֲשֶׁ֨ר יִשְׂמַ֤ח הָאָדָם֙
בְּֽמַעֲשָׂ֔יו כִּי־ה֖וּא חֶלְק֑וֹ כִּ֣י מִ֤י יְבִיאֶ֙נּוּ֙ לִרְא֔וֹת
בְּמֶ֖ה שֶׁיִּהְיֶ֥ה אַחֲרָֽיו׃
I saw that there is nothing better for man than to enjoy his
possessions, since that is his portion. For who can enable him to see
what will happen afterward?
Source: https://www.sefaria.org/Ecclesiastes.3.16?lang=bi&with=all&lang2=en
If we take the religious argument that Solomon wrote Ecclesiastes, then we have to consider that the wisest king we ever had, who was also a prophet, might not have believed in an afterlife. Also, the Sadduccees, who were mostly comprised of priests who believed they had inherited the proper Jewish tradition, also did not believe in an afterlife.
So to answer your question, I believe we are scared of death because we are too intellectually honest. Yes there is room to believe in an afterlife in Jewish thought, especially those of us who follow the Rabbinic tradition. But by keeping the ambiguity of the afterlife in our Bible we have avoided becoming like other religions who rely on the afterlife to keep their followers in line to a fault. The Christian scriptures are so much shorter than ours, yet it discusses the afterlife way more than ours. The same is true for Islam, and so it's a shock to no one that martyrdom and religious wars are more prevalent in their traditions than in ours. Because in their traditions, to deny the afterlife is a denial of faith.
Whereas in Judaism, questioning the afterlife is a sign of intellectual honesty. There could be an afterlife, but as the author of Ecclesiastes points out, it's not observable. We can write all the books we want about the soul, the levels of the soul, its different types and where it goes after death. But these teachings will never be a fact. Because a fact is provable, it can be demonstrated in multiple ways, it can be repeated by others. And so as Ecclesiastes points out, the only fact we have is the one the God says at the start of our tradition. To dust we shall return.
I believe Rabbi Telushkin does a good job summarizing the belief in the afterlife from our tradition as follows:
In Judaism the belief in afterlife is less a leap of faith than a
logical outgrowth of other Jewish beliefs. If one believes in a God
who is all-powerful and all-just, one cannot believe that this world,
in which evil far too often triumphs, is the only arena in which human
life exists. For if this existence is the final word, and God permits
evil to win, then it cannot be that God is good. Thus, when someone
says he or she believes in God but not in afterlife, it would seem
that either they have not thought the issue through, or they don't
believe in God, or the divine being in whom they believe is amoral or
immoral…. Because Judaism believes that God is good, it believes that
God rewards good people; it does not believe that Adolf Hitler and his
victims share the same fate. Beyond that, it is hard to assume much
more. We are asked to leave afterlife in God's hands.
Source: https://www.jewishvirtuallibrary.org/afterlife
Rabbi Telushkin points out that it's not an established faith in our Bible that tells us to believe in an afterlife. Rather it's notions of good and morality that leads Jews to believe there must be something more to death. Therefore if a Jew believes in a "good God" then such a Jew would take the next intellectual thought that the fate of an evil person will be different than the fate of a good person. This idea also takes for granted that death is "bad," and therefore death should be reserved for "bad people." It's very logical, but it starts off with a definition of God that's based on our sense of morality, our sense of what Goodness is, rather than accepting the God as described in the Bible/Tanakh. But to me, death is not evil in the Bible, it's just a given, no different than gravity or hunger. Everyone dies because death is what gives life meaning, not the other way around. And from my read of the Bible, death is considered a GOOD thing since we have eaten from the tree of knowledge of Good and Evil, and therefore it would be bad for us to now live forever.
Genesis 3:22-23
וַיֹּ֣אמֶר ׀ יְהֹוָ֣ה אֱלֹהִ֗ים הֵ֤ן הָֽאָדָם֙ הָיָה֙ כְּאַחַ֣ד
מִמֶּ֔נּוּ לָדַ֖עַת ט֣וֹב וָרָ֑ע וְעַתָּ֣ה ׀ פֶּן־יִשְׁלַ֣ח יָד֗וֹ
וְלָקַח֙ גַּ֚ם מֵעֵ֣ץ הַֽחַיִּ֔ים וְאָכַ֖ל וָחַ֥י לְעֹלָֽם׃
And God יהוה said, “Now that humankind has become like any of us,
knowing good and bad, what if one should stretch out a hand and take
also from the tree of life and eat, and live forever!”
וַֽיְשַׁלְּחֵ֛הוּ יְהֹוָ֥ה אֱלֹהִ֖ים מִגַּן־עֵ֑דֶן לַֽעֲבֹד֙
אֶת־הָ֣אֲדָמָ֔ה אֲשֶׁ֥ר לֻקַּ֖ח מִשָּֽׁם׃
So God יהוה banished [humankind] from the garden of Eden, to till the
ground from which it was taken:
From this Biblical perspective, death is a good thing and is here to make sure no one like Hitler could ever live forever. In my opinion, if someone accepts the God of the Bible, the God who promised the first man that he would die and return to dust, the God who expects us to take care of the earth for the next generation of life, the God who expects us to do what is right BECAUSE IT IS RIGHT.... Then one comes away with a set of logical thoughts presented by Ecclesiastes.
My answer is not an attempt to say the afterlife doesn't exist. But I don't think it's an accident that our Bible doesn't mention an afterlife, and questions the concept when it arises. If belief in an afterlife leads a Jew to do good and righteous things then great. But for me, I find great comfort that our holiest book doesn't ask us to deny the reality of death, nor does it demand that we live for the sake of heaven. If the void is what awaits me then that's fine, if heaven happens to exist then I'll be very grateful for the bonus.