You observe,
Lines are missing between healthy and total column
You must replace
\multicolumn{2}{c}{BMI}
with
\multicolumn{2}{c|}{BMI}
Addendum: There's a lot of cruft in your code; worse, the table isn't all that readable. It's not confidence-inspiring that you have \begin{tabular}{|c|c|cc|c|c|}, since the table contains 5, not 6, columns. Take a look at how I tried to fix the most pressing issues in the first table below. Speaking for myself, I can't say I find this table attractive or appealing. The second table does away with all vertical lines and uses left-alignment rather than centering for the text columns.

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{multirow,makecell}
%% for the second table:
\usepackage{booktabs,siunitx}
\usepackage[skip=0.333\baselineskip]{caption}
\begin{document}
\begin{table}
\centering
\caption{Dreadful}
\begin{tabular}{|c|c|cc|c|}
\hline
\multirow{2}{*}{Activity level} &
\multirow{2}{*}{Resting heart rate} &
\multicolumn{2}{c|}{BMI} &
\multirow{2}{*}{Total}\\
& & Unhealthy & Healthy & \\
\hline
Inactive & Normal & 9 & 13 & 22\\
& Abnormal & 16 & \cellcolor{pink}8 & 24\\
Active & Normal & 3 & 28 & 31 \\
& Abnormal & \cellcolor{gray}6 & \cellcolor{gray}17 & 23 \\
\hline
Total & & 34 & 56 & \textbf{100} \\
\hline
\end{tabular}
\bigskip
\caption{Better}
\begin{tabular}{@{} llccc @{}}
\toprule
Activity level & Resting heart rate &
\multicolumn{2}{c}{BMI} & Total\\
\cmidrule{3-4}
& & Unhealthy & Healthy & \\
\midrule
Inactive & Normal & 9 & 13 & 22\\
& Abnormal & 16 & \cellcolor{pink}8 & 24\\
\addlinespace
Active & Normal & 3 & 28 & 31 \\
& Abnormal & \cellcolor{gray}6 & \cellcolor{gray}17 & 23 \\
\addlinespace
Total & & 34 & 66 & \textbf{100} \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
{}button so that your latex code appears in teh grey box with line endings and\\displayed correctly. – David Carlisle Mar 26 '20 at 22:2556in the bottom row should be66... – Mico Mar 26 '20 at 22:44