The strongest ending is the perfect (authentic) cadence, V to I, which sounds final. A plagal cadence, IV to I, is the softer "amen" ending. A half cadence stops on V and sounds like a comma rather than a full stop. A deceptive cadence moves from V to an unexpected chord, often vi, and keeps the music going.
Cadences matter in timed media: an ad or trailer that ends on a perfect cadence feels resolved, while ending on a half cadence leaves the viewer expecting more.
Using it in a prompt
Ask for "ends on a clear, resolved chord" for intros and ad endings, or "ends unresolved" when the music should lead into something else.