The sound of my guitar is heard delayed. How to avoid latency?

This is called audio latency. Especially on some Android devices, processing an analog signal is not fast enough. Generally, USB audio interfaces generally reduce the latency to unnoticeable milliseconds. Check the following post to learn more about avoiding audio latency: