It starts with choosing the right algorithms, using an index instead of doing a linear search, minimizing network traffic, ... but sometimes there are just unneccessary sources of slowness.
I was tinkering with a react-native app the other day which shows a map and lets the user click on a building, and then highlights the building and shows some information. There was a noticable delay after clicking which made it not much fun to use. So I spent a couple evenings (hobby time, not company time) to integrate a proper spatial database with a fast spatial index, precache a lot of data, so I didn't have to hit the network. It got snappier, I could query a lot of geometry much faster, but it still felt slow. Then I looked into the source of the libraries, and in some react-native glue code I found that the event handler was waiting after the first tap for a double-tap, and thus would only register the tap after a couple hundred ms. One tiny change and it became blazing fast.
I believe most apps could do most things instantaneously. Google can find any document on the net in a few ms, after all. But of course not everybody has the time and money (or even skills) to polish their apps that much. If the customer will buy your app when it is good enough then why should you put in more work (besides from a personal sense of craftsmanship)?