Find the volume inside the cylinder but outside the sphere? H=12cm.

Apparently, there is a sphere inside a cylinder, and we need to find
(the volume of the cylinder) minus (the volume of the sphere).

This wouldn’t be too awfully difficult if we had the measurements we need
in order to calculate the volume of the cylinder and the volume of the sphere.  
You did give us a number, thank you, but no description, so we don’t even know
what’s 12, because we don’t know how ’H’ figures into anything.

If you have the numbers, here are the formulas you’ll need:

Volume of a cylinder = π (radius)² (height or length)

Volume of a sphere = (4/3) π (radius)³
Oh I think I get it.   There’s a little ball stuck inside a cylinder, they
both have the same radius, and the height of the cylinder is 12.

That’s still not enough information to do a complete calculation.
I’m afraid we still need that radius.   But we can get closer:

Volume of the cylinder = π (radius)² (12)

Volume of the sphere = (4/3) π (radius)³

(Cylinder) minus (sphere) = (4/3) π (radius²) ( 9 - radius ).

Stuff the number for the radius into that, and you’ll have the answer.

And if you need it, remember, the radius is 1/2 of the diameter.