This chapter of the Metro Exodus Sam's Story guide describes the passage of the final mission on the ship.
Get on board the ship and follow the Captain. Speak with Tom and the Captain. Soon, the ship will be attacked - you are assigned to defend it. Get out on the boat, walk on the footbridge and defeat the bandits.
Move forward and enter the power plant. More bandits are waiting inside - interact with the fuse box to turn the light off and kill the opponents. Fight the enemies and move on - you have to walk on the containers and fight enemies.
You reach a place where you have to fight with mutants from the containers. Keep going until you get to the other side of the docks - you have to deal with another wave of enemies.
Go towards Klim - he is at the top of the tower. You have to face Klim. The duel will end with his death. Move on the footbridge further and you will be faced with the last and most important choice. You can blow up the boat or throw away the detonator. If you care about the good ending - choose the option to destroy the boat. This is the end of Sam's story!