Receiving a soccer ball with your foot is essential for the game. You have various options to receive it, but using the foot is one of the most used and most common ways to receive and set up the ball in soccer.
More than just focusing on technique, how to actually receive the soccer ball, it's more important to focus on the position you have before the ball or where the ball is when its coming at you.
So rather than standing flat-footed, you want to keep moving on the toes.
You want to be available. You want to be ready, agile.
If the ball is not coming 100% at you, if the ball comes slightly to your left, you want to adjust your position.
Instead of reaching out with a straight leg, you want to be behind the ball with the opposite toe of the planting foot pointing towards the ball and then having the nice 90 degree open foot towards the ball so the ball can run into your foot, you can cushion the ball, you can absorb the energy of the incoming ball with your foot slightly off the ground, and you swing back as soon as the ball hits your foot.
Another way to receive the ball is to not calm it down for example, but to rather give it a light touch into the open space right away.
So instead of totally trapping the ball, you want to set it up into the open space. Move with the first touch out of your position and gain some momentum and advantage over your position.
That's the basic idea of how to trap the ball with your foot. I hope that that's a good start for you.