The Sea Sorcerer's Curse of the Sea feature states, in part:
Once per turn when you cast a spell, you can trigger the curse if that spell deals cold or lightning damage to the cursed target or forces it to move. Doing so subjects the target to the appropriate additional effect below, and then the curse ends if the spell isn't a cantrip (you choose the effect to use if more than one effect applies):
Cold Damage. If the affected target takes cold damage from your spell, [...]
Lightning Damage. If the affected target takes lightning damage from your spell, [...]
Forced Movement. If the target is moved by your spell, [...]
When you cast a wizard spell of 5th level or lower that deals damage, you can deal maximum damage with your spell.
In the question "When must the wizard choose to overchannel?", this feature was ruled that it is used when you cast a spell, not when the spell actually deals damage. However, the Curse of the Sea feature uses different wording, and I'm unsure how (if at all) this impacts the feature's timing.
Does the Sorcerer decide to use the feature when casting the spell, or when the spell actually deals damage/forces movement?
One time where it matters:
If you used this feature when you cast a spell and chose to do so, and then the creature turned out to be immune to cold damage, the additional effect would not occur.