This may be a very lukewarm take, but I think one of the most important ways to establish tension in a story is to give actions consequences.
Not every consequence needs to be negative, and not every negative consequence needs to be catastrophic, but one of the easiest ways to kill the tension in a story is to teach your reader that it doesn't matter what the main characters do because everything will work out for them, and any setbacks won't have long-term consequences.
Because once you've taught that to the reader, then why should they care what the characters do? What does it matter whether they make the "right" decision because every decision will ultimately be the last one.
And once you've given your reader that for long enough, you can't really go back, because that will feel like a betrayal. You can't give the first negative consequence 3/4 of the way through the story, because you've already set up the story as one where actions don't have (negative) consequences.
When you're thinking about how to give actions negative consequences, consider that there are a many different types of consequences, including:
Physical (death, injury, disease, etc.)
Emotional (fear, concern, anxiety, sorrow, guilt, PTSD, etc.)
Social (loss of a relationship or friendship, mistrust from other characters, etc.)
Temporal (loss of time trying something that didn't work, additional time required for recovery, etc.)
Locational (loss of territory, displacement to somewhere else, etc.)
Autonomous (arrest, detainment, kidnapping, loss of ability to act of their own accord, etc.)
It can make the story more interesting (and more realistic) to not just focus on one type of consequence but instead to consider different kinds of consequences (positive and negative) a character would face for their actions. Maybe they end up better physically than they would otherwise--but they lose other people's trust by their actions. Maybe they save someone but lose time.
Make your characters' actions matter.