Dear Himadree Das Just have a look here (where obviously KCl needs to be replaced by NaCl) https://www.aatbio.com/resources/buffer-preparations-and-recipes/hydrochloric-acid-potassium-chloride-buffer-ph-2
Indeed as you already anticipated somewhat the name buffer is a bit strange since this combination of just NaCl and HCl does not really give a buffer, but anyway apparently it is still called this way.
I really wish Chemists would change the way they think and teach about buffers and pH. The core issue is electroneutrality of the solution. This means the solution must have an equal number of positive and negative charges. Water (or any protic solvent) will ionize (H+ and OH-) to make up any difference (pKa of water is 15.7). The pKa's and concentrations of the various molecules determine how much H+ will be left in the solution and the corresponding pH (concentration of H+ = 10^-pH). A salt of 'hard' ions (e.g., NaCl) has zero impact on the pH of a solution as long as the pH of that solution is at least 2 points above the pKa of Cl- (-7). The pKa of Na+ is infinite. So, the HCl is the effective proton donor to a NaCl solution. A pH of 2 corresponds to a H+ concentration of 10^-2 (0.01 M or 100 mM). Therefore, a 100 mM HCl solution will have a pH of 2, independent of whether there is any salt (NaCl) in it. Note that, since the pKa of Cl is so far from the pH, this really isn't a buffer, but should be called a solution.
The best way to understand buffers and pH can be found in Chapter 5 of Schneider, BioSeparations, 2023 (www.bioseparationstext.com). There is an accompanying Excel spreadsheet for making buffer calculations, even for complex mixtures and concentrated solutions available online.