The first step is post a link to the actual Shield that you have bought.
Or at least say what colour the pcb is.
You identify the Touch pins by running the calibration sketch on a Uno.
Or by measuring the resistance with a DMM.
I suspect that you have a Blue 3.5 inch Shield. These tend to have Touch pins on
MCUFRIEND_kbv ID=0x7796 320 x 480 AliExpress shield
const int XP=8,XM=A2,YP=A3,YM=9; //320x480 ID=0x7796
const int TS_LEFT=895,TS_RT=127,TS_TOP=74,TS_BOT=930;
It looks as if Adafruit Touchscreen.h does not work very well on ESP32.
MCUFRIEND_kbv ID=0x7796 320 x 480 ESP32 USE_LOCAL_KBV
const int XP=12,XM=15,YP=33,YM=13; //320x480 ID=0x7796
const int TS_LEFT=927,TS_RT=138,TS_TOP=16365,TS_BOT=925;
Note that you can use any of those pins as Analog. e.g.
MCUFRIEND_kbv ID=0x7796 320 x 480 ESP32 USE_LOCAL_KBV Analog on D8,D9
const int XP=15,XM=12,YP=13,YM=33; //320x480 ID=0x7796
const int TS_LEFT=107,TS_RT=892,TS_TOP=935,TS_BOT=5;
My Calibration values are for a Blue ST7796S Shield. I suspect that your ILI9486 Shield has similar wiring. However most Red shields use D6, D7, A1, A2 and some Blue Shields also use that wiring.
I strongly recommend that you gain experience with the TFT_eSPI examples and library first. Before attempting Touch.
You also need to experiment with the Touch threshold values.
I am busy with other things. However if a reader posts links to their hardware and quotes a library example by name is likely to get readers to replicate your project.
I do not want to waste my time by guessing.