Menu Insert → File → Child document → Select the (1) filename and (2) the type of include. (warning: This is for the 2.3.1 versión, so maybe the option is in another submenu in 2.2.3, but I am pretty sure that you will find somewhere in the insert menu).
After accept the changes (press Ok) you can check with View → Code Preview Pane that this operation will insert the corresponding \input{} or \include{} LaTeX commands, but unlike use directly that commands in an ERT box, this way you can work with child documents in both LaTeX or LyX formats. Of course, in both cases the resulting LaTeX code of the main file will use only the LaTeX version (see image below), i.e., if you working child file is mychildfile.lyx the code will show \input{mychildfile.tex}, not \input{mychildfile.lyx} that obviously cannot work. Note that a right-click in the resulting box Input: mychildfile.lyx allow you to change the type of include or edit the child file.

On the other hand, if you want to use \includeonly{} that David mention in the comments, write it directly in Documents → Settings... → Latex Preamble just as explained in the answer of Bob.
\input{preamble.tex}within settings, under Preamble. Also use the button "Save as document details" within the settings window. I think this makes it possible to edit parts using input and include (I assume you are already doing this). With the same preamble and settings added to inputted .tex files, I think in most cases, the parts can be saved as seperate pdf output documents. – JohnShape Oct 17 '18 at 10:42