You are mixing two incompatible methods to generate citations and a bibliography in LaTeX.
You have \bibliographystyle{plain} and \bibliography{ref.bib} in the document body, which are used to generate BibTeX-based bibliographies. (It doesn't matter on a current system, but technically \bibliography{ref.bib} is wrong. The file name argument to \bibliography must not include the file extension, so \bibliography{ref} would be correct).
But then you also load biblatex (twice! \usepackage[natbib=true,style=authoryear,backend=bibtex,useprefix=true]{biblatex} and \usepackage[style=authoryear]{biblatex}, load packages only once to avoid confusion and option conflicts) and use its commands \addbibresource{bibliography.bib} (pointing to a different file than the \bibliography) and \printbibliography.
biblatex and the BibTeX-based bibliography method are incompatible and you need to choose one of the two.
biblatex
If you choose biblatex, you need to remove all \bibliographystyle calls and you may not have a \bibliography call in the document body. (You can give the .bib file in a \bibliography call in the preamble, but it is recommended to use \addbibresource - where the file extension must be included).
Your biblatex document would look roughly like this
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usetheme{Madrid}
\useoutertheme{shadow}
\useinnertheme{rounded}
\setbeamertemplate{navigation symbols}{}
\setbeamerfont{structure}{family=\rmfamily,series=\bfseries}
\usefonttheme[onlymath]{serif}
\usepackage[natbib=true,style=authoryear,backend=bibtex,useprefix=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\begin{frame}
Lorem \autocite{sigfridsson}
\end{frame}
\begin{frame}[t,allowframebreaks]
\frametitle{References}
\printbibliography
\end{frame}
\end{document}
Note, however, that it is strongly recommended to use Biber instead of BibTeX with biblatex. That should be as easy as changing backend=bibtex, to backend=biber, and running Biber instead of BibTeX (or telling your editor to do that: Biblatex with Biber: Configuring my editor to avoid undefined citations).
BibTeX
If you want to use BibTeX, remove all mentions of biblatex and its \addbibresource and \printbibliography commands. Instead use \bibliographstyle and \bibliography.
A BibTeX-based document would look like this
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usetheme{Madrid}
\useoutertheme{shadow}
\useinnertheme{rounded}
\setbeamertemplate{navigation symbols}{}
\setbeamerfont{structure}{family=\rmfamily,series=\bfseries}
\usefonttheme[onlymath]{serif}
\bibliographystyle{plain}
\begin{document}
\begin{frame}
Lorem \cite{incollection-full}
\end{frame}
\begin{frame}[t,allowframebreaks]
\frametitle{References}
\bibliography{xampl}
\end{frame}
\end{document}
Note that you should never load packages twice (in the question, hyperref and biblatex are loaded twice). In this case it is not necessary to load hyperref at all, since biblatex already takes care of that.
(pdf)latex -> bibtex -> (pdf)latex (twice)? – Bernard Jul 23 '20 at 10:49\addbibresource{bibliography.bib}in the preamble and\bibliography{ref.bib}towards the end of the document are in direct conflict with each other. Be sure to (a) delete\bibliography{ref.bib}and to make sure thatbibliography.bibcontains all needed bibliographic entries. – Mico Jul 23 '20 at 11:13hyperreftwice. (ii) Don't loadbiblatextwice. (iii) Since you employbiblatexwith the optionsnatbib=trueandstyle=authoryear, you should be using theplainnatbibliographystyle, not theplainbibliography style. – Mico Jul 23 '20 at 11:15bibliography{ref.bib}with the normal (with biblatex)\printbibliography. – Bernard Jul 23 '20 at 11:18