in the below code upto 2 chapter it is coming but thrid 
\documentclass[12pt, a4paper, openright, oneside]{book}

% ----------------------------
% Encoding and Language
% ----------------------------
\usepackage[utf8]{inputenc}       % UTF-8 encoding
\usepackage[T1]{fontenc}          % Output font encoding
\usepackage[english]{babel}       % Language

% ----------------------------
% Page Layout and Styling
% ----------------------------
\usepackage{geometry}             % Page dimensions
\geometry{
    left=3cm,
    right=3cm,
    top=3cm,
    bottom=3cm,
}

\usepackage{fancyhdr}             % Custom headers and footers
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{\leftmark}
\fancyhead[LO]{\rightmark}
\renewcommand{\headrulewidth}{0.5pt}

\usepackage{titlesec}             % Custom section titles
\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}{\chaptername\ \thechapter}{20pt}{\Huge}

% ----------------------------
% Fonts and Typography
% ----------------------------
\usepackage{mathpazo}             % Palatino font
\usepackage{microtype}            % Improved typography

% ----------------------------
% Graphics and Figures
% ----------------------------
\usepackage{graphicx}             % Include images
\usepackage{float}                % Floating objects
\usepackage{caption}              % Custom captions
\usepackage{subcaption}           % Subfigures

% ----------------------------
% Tables
% ----------------------------
\usepackage{booktabs}             % Professional tables
\usepackage{longtable}            % Tables across pages
\usepackage{tabularx}             % Tables with adjustable width

% ----------------------------
% Lists and Enumerations
% ----------------------------
\usepackage{enumitem}             % Custom lists

% ----------------------------
% Additional Packages
% ----------------------------
\usepackage{amsmath, amssymb, amsthm} % Math packages
\usepackage{tikz}                      % Drawing
\usepackage{algorithm}
\usepackage{algpseudocode}

% ----------------------------
% Hyperlinks and References
% ----------------------------
\usepackage{hyperref}             % Hyperlinks
\usepackage{cleveref}             % Enhanced cross-referencing

\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    citecolor=blue,
    urlcolor=blue,
    pdftitle={Explainable AI (XAI) Book},
    pdfauthor={Your Name},
}

% ----------------------------
% Bibliography
% ----------------------------
\usepackage[backend=biber, style=apa, natbib=true]{biblatex}
\addbibresource{bibliography/references.bib}

% ----------------------------
% Index
% ----------------------------
\usepackage{makeidx}
\makeindex

% ----------------------------
% Glossary
% ----------------------------
\usepackage[toc, acronym]{glossaries}
\makeglossaries
% \input{glossary/glossary.tex}

% ----------------------------
% Custom Commands and Environments
% ----------------------------
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

% ----------------------------
% Document Information
%----------------------------
\title{Explainable AI (XAI)}
\author{Your Name}
\date{\today}

% ----------------------------
% Begin Document
% ----------------------------
\begin{document}

% ----------------------------
% Front Matter
% ----------------------------
\frontmatter

\maketitle

% \begin{abstract}
%     Your abstract goes here. Provide a concise summary of the book's content, objectives, and significance in the field of Explainable AI.
% \end{abstract}

\tableofcontents
\listoffigures
\listoftables
\printglossaries
\printindex

% ----------------------------
% Main Matter
% ----------------------------
\mainmatter

% Include Chapters from Separate Folders
\include{chapters/chapter1/chapter1}
\include{chapters/chapter2/chapter2}
\include{chapters/chapter3/chapter3}
% ... add additional chapters as needed

% ----------------------------
% Back Matter
% ----------------------------
\backmatter

% \chapter{Bibliography}
% \nocite{*}
% \printbibliography

\end{document}