Ok so basically the formula of the volume of a cylinder is:
V = Area of base × height of cylinder
V =

r²h
If we know the diameter, we then know the radius
Radius is half the diameter.
r =

We use the given, We plug in the given formula and find the area (since we know the radius)
Volume(given) = Area(found) × Height(unknown)
We divide the volume by the area to find the height.

= height of prism
This is how we find the unknown height of the prism.