Load extra fonts with lualatex

No, it doesn't work like that and it really can't.

There exists no font naming convention and various fonts do very different things. Some fonts have a smcp feature, others don't and one has to specify the font to use for small caps.

Latin Modern Roman is in a very different situation: there are about 70 font files and it's out of the scope of fontspec to analyze them in order to do all necessary assignments.

However, for the particular case, .fd files are available, so you can use them.

\documentclass{article}
\usepackage{fontspec}

\setmainfont{EB Garamond}

\newfontfamily\lmodern{Latin Modern Roman}[
  NFSSFamily=lmr
]

\begin{document}

Abc\textsc{Abc}

\lmodern

Abc\textsc{Abc}

\end{document}

enter image description here


As an addendum to egreg’s excellent answer: for a custom font that stores small caps in a separate file, for example named SomeFont-RegularSC.otf and SomeFont-BoldSC.otf, you would load them with

\newfontfamily\somefont{SomeFont}[
   UprightFont = *-Regular ,
   SmallCapsFont = *-RegularSC ,
   BoldFont = *-Bold ,
   BoldFeatures = { SmallCapsFont = *-BoldSC },
   % Etc.
   Extension = .otf ]

You can also put this command in a file named SomeFont.fontspec so that you can write \newfontfamily\somefont{SomeFont} in your documents. This avoids leaving dependencies on one particular version of the font in all your documents.