In semi-inclusive deep inelastic scattering (SIDIS) the non-zero transverse momentum of partons is reflected in the transverse momentum $P_T$ of the produced hadrons. Assuming Gaussian dependence of transverse momentum dependent (TMD) PDFs and fragmentation functions (FFs) upon quark transverse momentum, exponential distribution of $P_T^2$ is expected. In 2016 and 2017, COMPASS experiment at CERN collected a large sample of SIDIS events using a longitudinally polarised 160~GeV/$c$ muon beam scattering on a liquid hydrogen target. The $P_T^2$ distributions of charged hadrons have been extracted from part of the data. They can be described by two exponentials and they qualitatively agree with earlier COMPASS measurements with an isoscalar target.