My goal is to produce a texture, so it must be flat and equalized in the same way and in each point of the image. Is there a procedure to do that in Photoshop? Thanks.
Correction so that it begins to seem to be photographed straight downwards - that does not exist except shooting a new photo. That's because nobody knows what's hidden behind the objects. If the pieces seem to be a little smaller on the top than in the bottom due the distance difference, that can be corrected by selecting all and applying Edit > Transform > Perspective. The amount of correction must be decided visually, there's no practical ways to calculate it without having some known pieces in the image or knowing the shooting angle, distance and the used lens. Here's one perspective adjustment:
As said, this is no fix, it compensates only some object size differences except the differences already were quite small, if we compare small particles. Actually my correction makes the image worse as a texture, because it exaggerates the fact that big stones are accumulated to the top half.
As already mentioned by user287001 The fix for existing shots is to attempt some guesswork with either Transform > Perspective, or Perspective Crop.
For this type of texture it's not vital to get the image exactly perpendicular to the ground, but when you come to doing more exacting surfaces, there are a couple of things you can try.
Bricks or paving slabs, of course can provide their own guide for you, but you could consider carrying something large-ish & square... a carpet tile, a tea-tray... you can drop on the ground & use as an estimate guide.
Alternatively if you use a longer lens from further away, you will naturally reduce the percentage distance change between near & far points.
Think of a simple close-up portrait, basically just face & neck.
Take a selfie with your phone & compare it to the same framing taken on a decent camera from 15 ft away with a longer lens.
Selfie... big nose, little ears. Long-shot... 'normal'
The issue with trying to do that whilst taking shots of the ground, of course, is how big a set of steps would you like to carry - which may take you right back to the carpet tile ;)
If you are too close to your subject though, even if it's one like your question with no really discernible scale, you will still find that identical objects near centre frame will look larger than ones towards the edges (unless you use a phone camera, in which case they will smear horribly at the edges instead ;)