you'll need to know your LG TV model number, its year of manufacture, and have the original remote control that came with the TV on hand (universal remotes won't work). The process may vary ...
An easy way to control your smart TV when the remote goes missing is to use your smartphone. Most smart TVs have official remote apps, like SmartThings for Samsung, LG ThinQ, and Roku Remote.