I have an N64 emulator on my phone and I connect my cell phone with my Xbox one controller mirror to my TV and can play but it is so delayed when I A press lasts 2 seconds until it responds how can I fix the delay
You probably mirror your screen over Wi-Fi to your Fermseher. This transmission standard creates a latency in the seconds range. That is normal.
You should mirror your screen over HDMI if your device supports it. You need a USB-C to HDMI adapter or cable. Supported devices would be e.g. The Samsung S or Note devices (from S8 or Note 8) or the P or Mate series from Huawei (from P10 or Mate 10, each without Lite model).