Based on everything you have already tested, I would not buy any more cables or adapters yet.
You have established that the M5 MacBook Pro can output HDMI to the Skyworth TV, while the LG monitor works with your older MacBooks. The next step is to determine exactly how macOS is detecting the LG.
One thing worth checking first is your macOS version.
macOS Tahoe 26.6.2 is now the current Tahoe release, so if you are still running 26.2, it's worth installing the latest update before doing further troubleshooting.
Apple currently lists 26.6.2 as the latest version, although Apple does not specifically state that it contains a fix for external-display problems.
Apple: What's new in the updates for macOS Tahoe 26
With the LG connected, go to >> System Settings >> General >> About >> System Report >> Graphics/Displays and check whether the LG 27MK400H appears there.
If it does, copy the information shown for the LG and post it here. If it does not appear, that is also important to know.
Apple recommends using System Settings >> Displays, holding the Option key, and selecting Detect Displays when an external display isn't recognzed.
Apple also recommends disconnecting and reconnecting the display, putting the Mac to sleep and waking it, and restarting it.
Apple: If your external display is dark or low resolution
If the LG is detected, check whether macOS allows you to select 1920 × 1080 at 60 Hz, which is the monitor's native resolution.
Since the problem began after the Tahoe 26.2 update, testing the LG in Safe Mode would also be useful.
If it works there but not during a normal startup, that would give us useful information about the cause.
Apple: Start up your Mac in safe mode
The most useful thing you can send me now is the Graphics/Displays information for the LG while it is connected.