Every prism-volume question is the same two moves: find the area of the end face, then multiply by how long the prism is. The only thing that changes is the shape of that end face.
The Two Moves
One — area of the cross-section. That's the end face, the slice that stays the same all the way through. If it's a rectangle, length × width. If it's a triangle, ½ × base × height. Whatever the shape, work out its area first.
Two — multiply by the length. Volume = cross-section area × length. One multiplication and you're done.
A Worked One — Rectangular Prism
A box with a 4 cm by 3 cm end, 5 cm long. Cross-section: 4 × 3 = 12 cm². Then 12 × 5 = 60, so the volume is 60 cm³.
A Worked One — Triangular Prism
A tent-shaped prism with a triangular end: base 6 cm, height 4 cm, and it's 5 cm long. Cross-section: ½ × 6 × 4 = 12 cm². Then 12 × 5 = 60 cm³. Notice the second move is identical — only the area of the slice was worked out differently.