Where I live, by the sea, the beaches are covered in shingle. Walking barefoot to the waterline to paddle or swim can be a painful business.
When we were kids we were on the beach a lot but the problem was not the same. We could run about on the stones all the time and never notice them. Perhaps we just got used to them, or maybe it was we were smaller and lighter back then, the pressure on our feet wasn’t so great.
But as an adult, if you want to swim you have to accept the stones; tread carefully and you get used to the discomfort, and with practice your feet learn how to navigate the pebbles.