Recently we developed [Phys. Rev. Lett. 122, 246403 (2019) & Phys. Rev. B 99, 235139 (2019)] an ab initio framework to explore polarons in real materials, without resorting to the conventional supercell approach. In that work, the polaron formation energies, wavefunction, atomic displacements and the spectral decompositions were obtained by solving a secular equation in a spirit similar to the Bethe-Salpeter equation for excitons. This time we apply this approach to explore the influence of the dimensionality effects on the polaron properties, by considering a localised hole polaron in both monolayer and bulk hexagonal boron nitride as an example. To demonstrate the concept of two-dimensional polarons, we compare the spatial extent of the hole polaron in both cases. We find that the hole polaron is localised within a layer with the width of an atomic orbital ~1.4 angstrom, which is an order of magnitude smaller than the localisation length in bulk h-BN. The polaron formation energy for the monolayer is found two times larger than for the bulk, as expected from the reduced screening effect in two dimensions. This is similar to what is found in previous studies of excitons in h-BN. Lastly, we present the spectral decompositions for both cases and show that the polaron is supported by LO phonons with different symmetries.