Is there any fire-related item or spell in D&D 5e that can create a fire that can burn underwater?
The fifth level evocation Immolation from the Elemental Evil Player's Companion wreathes a creature in flames.
These magical flames can’t be extinguished through nonmagical means.
Since water is non-magical, an Immolated target should burn quite nicely underwater.
(For up to 1 minute, if you concentrate, and they fail their save.)
The common magic item, candle of the deep (XGE 136), may be what you are looking for.
The flame of this candle is not extinguished when immersed in water. It gives off light and heat like a regular candle.
Although this is just a candle, it gives an indication for how powerful WotC think an item with similar properties may be; namely, not at all (considering this is a common, minor, magic item).
The second level cleric, wizard, and artificer spell continual flame produces a flame which
can be covered or hidden but not smothered or quenched.
Since water puts out fire by quenching it, a continual flame can burn underwater.
I'm not sure what the purpose for this is, but if you want it to be magical there's one option at least. The cantrip create bonfire from Xanathar's Guide to Everything (page 152) is a magical fire that does not require fuel, though it does behave like normal fire and can ignite objects.