This study demonstrates the efficacy of employing the GEANT4 simulation toolkit for investigating the background spectra of High Purity Germanium (HPGe) detector induced by atmospheric cosmic rays. GEANT4 is utilized to accurately replicate the experimental setup, detector geometry, and the gamma background spectrum for the HPGe detector. The EXPAC model is used to generate above-ground-level cosmic-ray particles for the terrain. Various techniques, such as the use of low-activity lead and oxygen-free copper as shielding materials, along with an external plastic scintillator to veto cosmic rays from the atmosphere, are employed to improve the signal-to-background ratio of HPGe detector systems. Photopeaks associated with