Moses presented his people with a choice between obedience, blessings, and life, or disobedience, curses, and death. And he told them to choose life.
When God decided Jesus had to die, Jesus tried to get out of it. Jesus always did what pleased God, and never sinned. So trying to stay alive must be the right thing to do, even if God wants you dead.
Peter encouraged Christians to actively do everything they could to try to make sure they would make it into the kingdom of heaven and gain everlasting life. So you should try to stay alive even after you die.
But Jesus said if you try to keep your life, you’ll lose it. That can’t be good, can it? You wouldn’t really be choosing life, would you?
So the right choice must be to be indifferent to death, or even to try to die, like Samson did. When he asked God to give him his super-strength back for the purpose of a suicide attack, God cooperated and helped him die. God must not have wanted him to try to keep his life.
God sent Jesus on a suicide mission too, and didn’t let him quit. He didn’t want Jesus to try to keep his life.
Maybe you can do both? Jesus said whoever tries to keep their life will lose it, but also whoever loses their life will preserve it. If you believe that nonsense, you can try to lose your life by trying to keep it, and you can try to keep your life by trying to lose it.