New xj owner needing direction

recently bought 1996 jag xj6 4.0 while driving stalls out sometimes have to use two foot method. Don’t know what it is any clues

Do you have a check engine light illuminated on the dash? If you do I would have a local autoparts store pull the codes for you. If not then it might be an issue with the fuel pump or fuel pump electrical supply. I recently had a stalling and no start problem and it turned out to be a loose fuel pump relay in the fuse / relay box in the trunk. This did not produce any codes so no check engine light.

Hello
If it has been sitting for an appreciable length of time without a full fuel tank: you could easily have water or other debris in the fuel.
This will choke out the injectors as they move off low speed.
Try a few units of gas line anti-freeze. This will breakdown the water molecules and allow them to pass. It won’t work for about a day, or so, because it has to come into contact with the ‘puddle,’ or ‘puddles’.
For the heck of it, remove your filler cap and try driving. It could be clogged and not allow enough passage of air to balance the lower fuel level. If you do drive, though, this will throw a code in about a block. On the bright side, if it does throw a code and there is no change regarding stalling, at least you know your filler cap is good.