I would like to get a script O looking like this:

However, \mathcal O and \mathscr O give
, which are slightly different.
This is not the pre-1992 \mathcal O.
I would like to get a script O looking like this:

However, \mathcal O and \mathscr O give
, which are slightly different.
This is not the pre-1992 \mathcal O.
Run with xelatex:
\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmathfont{STIX Math}
\begin{document}
\Huge $\mscrO$
\end{document}

amsmath is not needed here but it is always a good idea to load it and that must be done before unicode-math
\mathscr{O} from the euler package is thinner than the one from mathrsfs, which you obviously use:
\documentclass{standalone}
\usepackage{euler}
\begin{document}
$\mathscr{O}$
\end{document}

I had the same problem you had trying to get some equations out of Laeqed that uses TeX so I guess is the same.
In my case I discovered that the font by default was set to be Times New Roman, so I tried to change the font back to the standard one and when i compiled again the problem solved by itself and the $\mathscr{O}$ changed back to $\mathcal{O}$.