Make 2 chapter files: chap1.tex and chap2.tex, and 2 bib files: bib1.bib and bib2.bib. Save these files in your project folder on Overleaf. Make the main file: TeXSE.tex Compile TeXSE.tex.
Chap1.tex file:
\section{First section of chapter 1}
This is Chapter 1 from the input file chap1.tex.
This is a citation for Acemoglu (2000) \cite{acemoglu2000} from bib1.
Acemoglu (2012) \citep{acemoglu2012} is a citation for the second reference.
The Reference list for introductory chapter appears next.
\bibliographystyle{apalike}
\bibliography{bib1}
Chap2.tex file:
\section{First section of chapter 2}
This is Chapter 2 from the input file chap2.tex.
This is a citation for Acemoglu (2000) \cite{acemoglu2000} from bib2.
Ackerberg (2006) \cite{ackerberg2006} is a citation for the second reference.
The Reference list for the chapter appears next.
\bibliographystyle{apalike}
\bibliography{bib2}
bib1.bib file:
@article{acemoglu2000,
title={The colonial origins of comparative development: An empirical investigation},
author={Acemoglu, Daron and Johnson, Simon and Robinson, James A},
year={2000},
institution={National bureau of economic research}
}
@book{acemoglu2012,
title={Why nations fail: the origins of power, prosperity and poverty},
author={Acemoglu, Daron and Robinson, James A and Woren, Dan},
volume={4},
year={2012},
publisher={SciELO Chile}
}
bib2.bib file:
@article{acemoglu2000,
title={The colonial origins of comparative development: An empirical investigation},
author={Acemoglu, Daron and Johnson, Simon and Robinson, James A},
year={2000},
institution={National bureau of economic research}
}
@article{ackerberg2006,
title={Structural identification of production functions},
author={Ackerberg, Daniel and Caves, Kevin and Frazer, Garth},
year={2006}
}
Make the main document file, TeXSE.tex:
\documentclass[12pt,a4paper]{report}
\usepackage[numbers,sort&compress,sectionbib]{natbib}
\usepackage{chapterbib}
\begin{document}
\chapter{First chapter}
\include{Chap1}
\chapter{Second chapter}
\include{Chap2}
\end{document}
Upload each of these files to your project folder on Overleaf.
Compile TeXSE.tex gives (the chapter titles are omitted):


This is the same approach as described here: Different bibliographies for each chapter with shared references except that using filecontents to save the files does not create the example files on Overleaf. Here, I just avoided that by making 5 separate files. Welcome to TeX.SE.