Hello. Do you reproduce the following when using the code: \documentclass[12pt]{amsbook}
\usepackage{mathrsfs}
\usepackage{amssymb}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}
\mathscr{A} \arrow[d, "f"]\\
B
\end{tikzcd}
\]
\end{document}?