One should not nest tikzpictures. By putting a tikzpicture in a node of another tikzpicture you are doing just that. If you store the inner tikzpicture in a box, you are safe. Alternatively you could use a pic, but the box is faster.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark,positioning,calc}
\NewDocumentCommand{\markpic}{m}{\tikz[remember picture]{\node[overlay,above=of pic cs:#1]{\mypic};}}
\newsavebox\mypicbox
\sbox\mypicbox{\begin{tikzpicture}
\node[circle=3pt,fill] at (0,0) {};
\draw[] (-.5,-.5) -- (.5,-.5);
\node[circle=3pt,fill] at (0,-1) {};
\end{tikzpicture}}
\NewDocumentCommand{\mypic}{}{\usebox\mypicbox}
\begin{document}
The diagram \tikzmark{C} above is incorrect.
\markpic{C}
\bigskip
The diagram below is correct.
\bigskip
\mypic
\end{document}
If you really need to nest tikzpictures, you need to make precautions that the inner tikzpicture does not use certain keys of the ambient one. In this case, the problem is above, which sets the anchor to south. Therefore the circles appear to be displaced. Alternatively, you could avoid using nodes for the circles, and just fill some circles. (In nodes, the circle key is a shortcut for shape=circle, and it does not take arguments, so circle=3pt is the same as circle in this context. You can set the radius via the inner sep key.)
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark,positioning,calc}
\NewDocumentCommand{\markpicA}{m}{\tikz[remember picture]{\node[overlay,above=of pic cs:#1]{\mypicA};}}
\NewDocumentCommand{\markpicB}{m}{\tikz[remember picture]{\node[overlay,above=of pic cs:#1]{\mypicB};}}
\NewDocumentCommand{\mypicA}{}{\begin{tikzpicture}[nodes={anchor=center}]
\node[circle,fill] at (0,0) {};% circle does not options, so "3pt" can be dropped
\draw[] (-.5,-.5) -- (.5,-.5);
\node[circle,fill] at (0,-1) {};
\end{tikzpicture}}
\NewDocumentCommand{\mypicB}{}{\begin{tikzpicture}
\fill[radius=3pt] (0,0) circle;
\draw[] (-.5,-.5) -- (.5,-.5);
\fill[radius=3pt] (0,-1) circle;
\end{tikzpicture}}
\begin{document}
The diagram \tikzmark{C} above is now correct.
\markpicA{C}
\bigskip
The diagram below is correct.
\bigskip
\mypicA
\vspace{4em}
The diagram \tikzmark{D} above is now correct.
\markpicB{D}
\bigskip
The diagram below is correct.
\bigskip
\mypicB
\end{document}

center. The problem is that in the ambienttikzpictureyou use theabovekey, which sets theanchortosouth, so you need to undo this. I added a code for this scenario. There can be other "offending" keys which you may have to undo in a similar fashion in variations of this scenario. – Feb 21 '23 at 04:34tikzpictureexcept in this particulartikzmarkcase, so I'll take my chances on embedding by adding thenodes={anchor=center}to my picture style. Thecircle=3ptis not actually used in my real code; not sure what I was thinking when I used it in the example. – Alan Munn Feb 21 '23 at 04:49