I'm new to the platform, and I don't have much experience using Latex. I'm trying to learn how to use the packaged \usetikzlibrary{animations} in Tikzpicture, following the steps of the site https://tikz.dev/tikz-animations, but every time I try to run it on my TexMaker machine (windows) and Overleaf, any code of these animations it either shows errors or it doesnt execute any of the animations, which I don't understand and don't know how to fix. Does anyone out there know how I run these Tikzpicture animation codes in Overleaf and TexMaker? Here's an example of a code I tried to use
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{animations} % LATEX and plain TEX
%\usetikzlibrary[animations] % ConTEXt
\begin{document}
The code below doesnt work, keaps getting error
\begin{tikzpicture}[
animate/orbit/.style 2 args = {
myself:shift = {
along = {
(0,0) circle [radius=#1]
} sloped in #2s/10,
repeats }} ]
\node :color = {0s = "orange",
2s = "red",
4s = "orange",
repeats}
{Sun};
\begin{scope}[animate={orbit={2.5cm}{365}}]
\node {Earth};
\node [animate={orbit={1cm}{28}}] {Moon};
\end{scope}
\useasboundingbox (-3.8,-3.8) (3.8,3.8);
\end{tikzpicture}
The code below doesnt work the animation
\tikz [animate = {
object = node, attribute = fill, time = 0s, value = red, entry,
object = node, attribute = fill, time = 2s, value = blue, entry,
object = node, attribute = fill, begin on = click, entry}]
\node (node) [fill, text=white] { Click me };
\end{document}
I Also notice that in other for the animation to run you need a special program like Adobe or FoxIt Reader, but how can i incorporate these animations on an Beamer presentation?

To make a long story short: TikZ animations currently work only with svg output (and use the smil “flavor” of describing animations). In future, it may well happen that other “flavor” of describing animations will be added, but it is very unlikely that pdf will ever support animations in a useful way.You can apparently includesnapshotsin a PDF, but you can't create animations this way. If you want to create animations for Beamer, I recommend looking at the methods documented in Beamer's manual or at third-party packages. – cfr Nov 28 '23 at 20:50