Generate LUT from pre- and post-grade image
One method would be MatchGrade in Nuke (available only in NukeX and Nuke Studio). It can calculate LUT/CDL from two inputs.

https://learn.foundry.com/nuke/content/reference_guide/color_nodes/matchgrade.html

Blackmagic Resolve has feature for automatic shot matching, but I don't know if you can export LUT from that.