A .lua file may be used by many different apps, particularly games.
Lua is a powerful, efficient, lightweight, embeddable scripting language. ... Lua has been used in many industrial applications ... and games (e.g., World of Warcraft and Angry Birds).
My guess is that you don't need to associate .lua with anything. It's probably just the fact it's already associated with something else that Civ 6 is objecting to.
I have files with an extension .vdbsag, like your .lua it's not a known file extension for Windows. I've previously tried to associate this with 7zip File Manager (it couldn't open them) and then used File Explorer's 'Open with...' (ticking the 'always use this app...' box) to open it in Wordpad.
Searching the Registry for all occurrences of 'vdbsag' found the following keys...
containing the DWORD values: Applications\7zFM.exe_.vdbsag, Applications\WORDPAD.EXE_.vdbsag, vdbsag_auto_file_.vdbsag
I deleted all the keys and values with 'vdbsag' in their name, after which File Explorer showed Open with... as the default action when I right-clicked on a .vdbsag file. Selecting Wordpad to open .vdbsag and ticking 'always use this app...' recreated them (except the 7zFM one, of course).
Hope that helps.