In Midway (2019), what are these things being launched from a cruiser?
I draw the trajectory of those things with yellow lines.
They are indeed depth charges.
Note: what they fail to depict though, is that the depth charge Carrier is thrown with the actual depth charge. These are the parts that secured the DC to the thrower before launch.
And that is the IJN Arashi, a Japanese destroyer, being depicted attacking the US submarine USS Nautilus.
The scene before depicts USS Nautilus conducting an underwater torpedo attack on the Imperial Japanese Navy.
It then cuts to the Japanese Admiral saying:
"Order the Arashi to pin down that submarine"
Arashi carried more than 30-odd depth charges and 22 detonations were heard by Nautilius.
Here is a typical Japanese depth charge, DEPTH CHARGE TYPE 95, rather like those depicted in the movie:
http://michaelhiske.de/Allierte/USA/OrdnancePamphlets/OP1507/Chapter02/Section03.htm
http://pwencycl.kgbudge.com/D/e/Depth_Charge.htm
Notes on IJN Arashi vs USS Nautlius:
https://dbpedia.org/page/Japanese_destroyer_Arashi
https://erenow.net/ww/the-battle-of-midway/15.php
Japanese Type 94 Depth Charge Thrower:
Note the Carrier w/stalk is shown separately here, and are missing from the movie scene.
Like all 'throwers' of the period, they literally throw the object out 45 yards, and depending on the settings, detonate at a certain depth.
Heres a real thrower in action:
Probably depth charges.
Designed to sink submarines by exploding near them. They were launched into the sea and would explode at a given depth, controlled by a pressure switch - partly through guesswork & partly by them having a spread of depths, for a better chance of a strike. They were originally little more than oil drums with explosive and a switch. Later they became more streamlined and could impart spin for better accuracy. They were used from WWI right though WWII and beyond.