Update: The Simple Solution
Although stix2 has lowercase Greek letters in \mathrm, LaTeX’s default definitions of \alpha, \beta and so on ignore the current math alphabet. There is a package option to override this, [lcgreekalpha].
\documentclass{article}
\usepackage{amsmath}
\usepackage[lcgreekalpha]{stix2}
\begin{document}
\begin{equation}
\begin{split}
&\sin^2 \mathrm{\theta} \cos^2 \mathrm{\phi}\
+ &\cos^2 \mathrm{\theta} \cos^2 \mathrm{\phi}
\end{split}
\end{equation}
\end{document}

Note: Although stix2 does not provide upgreek-style commands, such as \upalpha, you might want to add them for compatibility with other packages. This will make it much simpler to change the font of your papers. You should remove upgreek, which isn’t compatible with stix2.
The following will set \upalpha to \mathrm{\alpha} if it has not been defined, but not change the existing definition if there is one, which should be safe to use with any document class:
\providecommand\upalpha{\mathrm{\alpha}}
With Modern Fonts
You can get upright Greek letters with unicode-math, in LuaLaTeX or XeLaTeX. Every Unicode math font has them. However, \mathrm is not the command to get them (at least, not out of the box).
There are at least four ways:
- Change
\mathrm{\omega} to \symup{\omega}
- Load
unicode-math with the [mathrm=sym] package option, to make \mathrm an alias for \symup. If you ever need words in math mode, use \textnormal or \textup instead.
- Use the
upgreek-style commands, which unicode-math supports.
- Instead of solving the real problem, change your
\mathrm font to one that has Greek letters. You’re only supposed to do that if you actually will be writing Greek words in math mode, like \mathbf{εὕρηκα!}. And in that case, you probably want to write Greek in text mode, too, so you likely already set it to something that will work. However, you can set this to a different font family with, e.g. \setmathrm{CMU Serif}.
Finally, you probably want to set
\tracinglostchars=3
in your preamble, to make TeX consider it an error when you request a symbol from a font that doesn’t have it. The default behavior, thanks to some technical debt from the 1980s, is to silently print a warning to the middle of a .log file.
\documentclass{article}
\tracinglostchars=3
\usepackage[stixtwo]{fontsetup}
\begin{document}
\begin{equation}
\begin{split}
&\sin^2 \symup{\theta} \cos^2 \symup{\phi} \
+ &\cos^2 \uptheta \cos^2 \upphi
\end{split}
\end{equation}
\end{document}

With Legacy Fonts
The only standard TeX font encoding that has all of the Latin and Greek letters is OML (which you can think of as “old math letters.”) However, very few font families have upright letters in this encoding. One package that does is mathdesign, which provides upright Charter (the mdbch family), Garamond (mdugm) or Utopia (mdput).
So, here is an extremely contrived example of how to select an upright font (Math Design Utopia) with Greek letters. It loads this as both the \mathrm alphabet and as the font for operators like \sin and \cos, redefines \theta and \phi so that they work properly with \mathrm, and also adds commands \uptheta and \upphi. It sets all of these up to work with \mathversion{bold}, so they will work with \boldsymbol or bm.
\documentclass{article}
\tracinglostchars=3
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\DeclareSymbolFont{upletters}{OML}{mdput}{m}{n}
\SetSymbolFont{upletters}{bold}{OML}{mdput}{b}{n}
\DeclareSymbolFontAlphabet\mathrm{upletters}
\DeclareMathSymbol{\theta}{\mathalpha}{letters}{"12}
%...
\DeclareMathSymbol{\phi}{\mathalpha}{letters}{"1E}
\DeclareRobustCommand\uptheta{\mathrm{\theta}}
\DeclareRobustCommand\upphi{\mathrm{\phi}}
\makeatletter
\def\operator@font{\mathgroup\symupletters}
\makeatother
\begin{document}
\begin{equation}
\begin{split}
&\sin^2 \mathrm{\theta} \cos^2 \mathrm{\phi}\
+ &\cos^2 \uptheta \cos^2 \upphi
\end{split}
\end{equation}
\end{document}

I say “extremely contrived” because, in practical real-world use, you would use a package for this, such as mathdesign or fourier in this case, or upgreek for something more compatible with Computer Modern. If you just want to load math alphabets that support Greek, isomath is a flexible package for that. However, if no package does exactly what you want, or you are writing your own font package, you can use commands like those to set it up.
Variations of these commands will also work with the fonts from any package that extends OML to its own custom 8-bit encoding, but keeps all the letters in the same places as OML. These include eulervm, newtxmath, newpxmath and stix2-type1. You will need to check the package documentation to see if it has font tables, and then probably reverse-engineer the package itself to see how it declares the encoding and family name. This is how it’s possible to use Euler for medium-weight letters but Math Design Charter for bold.
There is another alternative: mathastext has an option to load Greek letters from a font in the 8-bit LGR encoding, such as the ones from the Greek Font Society.
\mathrm{\greeksymbol}? – Mico Jul 08 '23 at 17:21\mathrm{\non variable symbol}– tetukowski Jul 08 '23 at 17:33