Some people seem to act like Titanic's success is some kind of inexplicable anomaly but it's always been much simpler to me.
One of the main reasons I think Titanic was so successful is that it touched on a particular event and era that had rarely been showcased in modern film. Pre-war Edwardian era anything was virtually undiscussed, let alone turned into a period movie. But it wasn't just a period piece, it was an epic disaster flick that highlighted a tragedy that, while famous, had been almost forgotten.
Plus the special effects were cutting edge and very well done. Tbh they still hold up to this day. Few films aside from maybe Jurassic Park, Jaws and possibly Terminator can say the same or boast that kind of longevity in the FX department.
That being said, it was honestly just a solid goddamn movie. A lot of action movies (especially action "epics") these days rely too heavily on SFX, exposition and big names to carry an otherwise subpar film, and will happily include tons of cringy, downright AWFUL dialogue the audience is expected to tolerate in order to see the hero eventually win. Of course this isn't to say every second of Titanic was Shakesperian - because there were for sure some cringy lines/cliché scenes - but overall you could tell it was clearly a project that all the actors involved took pretty seriously.