\documentclass[a4paper, 12pt, onecolumn, twoside, openany]{book}

% colors
\usepackage[x11names]{xcolor}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows.meta}
% 
\usepackage{amsmath}
\usepackage{physics}
\usepackage{nicefrac}
\usepackage[font={footnotesize}]{caption}
\usepackage{sidenotes}
\usepackage[a4paper, inner=23mm, outer=49mm, vmargin=30mm, marginparsep=9mm]{geometry}
\pagestyle{plain}

\usepackage[bookmarks, colorlinks=true, linkcolor=DeepSkyBlue2, citecolor=Blue4, urlcolor=blue]{hyperref}

%\usepackage[bookmarks, colorlinks=true, linkcolor=black, citecolor=black, urlcolor=black]{hyperref} %for the print version
% 
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[document]{ragged2e}
\usepackage[none]{hyphenat}
\addto\captionsenglish{\def\contentsname{Table of contents}}
% 
\usepackage{palatino}
\usepackage{pxfonts}
% 
\usepackage[detect-weight=true, detect-family=true, separate-uncertainty = true, multi-part-units=single]{siunitx}
\usepackage{graphicx}
\usepackage{float}
% 
% number everything per chapter
\numberwithin{figure}{chapter}
\numberwithin{table}{chapter}
% 
\usepackage{chngcntr}
\counterwithin*{sidenote}{section}
\makeatletter
\renewcommand{\thesidenote}{\@arabic{\numexpr\value{sidenote}+1\relax}}
\makeatother

% avoid alignement problem of the text of the sidenotes
\renewcommand*{\raggedleftmarginnote}{}
\renewcommand*{\raggedrightmarginnote}{}

% remove space between items in lists
\usepackage{enumitem}
\setlist{nosep}

% section numbering
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\huge}{\thechapter.}{10pt}{\huge}
\titlespacing*{\chapter}{0pt}{0pt}{15pt}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\thechapter .\arabic{section}}
\setcounter{secnumdepth}{3}
% 
% array things
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{1pt}}m{#1}}
\renewcommand{\arraystretch}{1.2}
\usepackage{multirow}
% 
% new commands
\newcommand{\removemargin}{\newgeometry{inner=27mm, outer=27mm, vmargin=30mm}}
% 
% biblio things
\input{biblio_config.tex}
\addbibresource{biblio.bib}
% 

\begin{document}
\sloppy
%
\removemargin
% title page
\thispagestyle{empty}
\begin{center}
  \begin{Huge}
    \textbf{
      A great title for a great thesis\\}
  \end{Huge}
  \vspace*{40mm}
  \begin{large}
    Dissertation\\
    University of somewhere\\
  \end{large}
  \vspace*{20mm}
  \begin{large}
    submitted by\\
  \end{large}
  \vspace*{3mm}
  \begin{Large}
    Name Surname \\
  \end{Large}
  \vspace*{30mm}
  \begin{large}
    City \\
    \vspace*{2mm}
    Year
  \end{large}
\end{center}
% 
% coverpage
\newpage

\chapter*{Abstract}
\pdfbookmark[0]{Abstract}{abstract}

Write here your abstract.

\cleardoublepage

\chapter*{Zusammenfassung}
\pdfbookmark[0]{Zusammenfassung}{zusammenfassung}

Also in another language.

\cleardoublepage

\pdfbookmark[0]{Table of contents}{toc}
\tableofcontents

\cleardoublepage

\restoregeometry

\chapter{Introduction}
Write here you intro.

\clearpage

\chapter{Context}
\label{chap:Context}

You can write content with also some citations\scite{1mm}{someone_something_2019}. You can also add figures in the margin.
\begin{marginfigure}[30mm]
  \centering \includegraphics[width=2.5cm]{example-image}
  \caption{A margin figure.}
  \label{mfig:example}
\end{marginfigure}

\vspace*{7cm}

Or in the full width of the page.
\begin{figure*}[h]
  \centering
  \includegraphics[width=16cm]{example-image-16x9}
  \caption{A full width figure.}
  \label{fig:example}
\end{figure*}

\chapter{Another chapter}
\label{chap:Another}
Also with text.


\removemargin
\chapter{Summary}
Conclude your work.

% do not cut between 1st name and surname
\defcounter{lownamepenalty}{500000}
\defcounter{highnamepenalty}{1000000}
\printbibliography[title={Bibliography}]
\addcontentsline{toc}{chapter}{Bibliography}

\cleardoublepage

\chapter*{Acknowledgments}
\addcontentsline{toc}{chapter}{Acknowledgements}
Acknowledge all your friends here.
\end{document}
