One of the most annoying errors I regularly get in Android Studio is the one complaining about insufficient storage when launching an app on a virtual device: INSTALL_FAILED_INSUFFICIENT_STORAGE.
05/31 16:08:52: Launching 'DebugViewPreview' on Pixel 5 API 32.
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_INSUFFICIENT_STORAGE
List of apks:
[0] '/Users/.../MyProject/build/MyProject-0.1.0-1.apk'
The device needs more free storage to install the application (extra space is needed in addition to APK size).
Retry
Failed to launch an application on all devicesThe solution is simple: open the Device Manager (Tools menu). Click the down-arrow on the right for the device where you want to install the app and select “Wipe Data”.

Careful with the next dialog—don’t just click it away. Nothing will happen if the device is still running: no data will be wiped and you still won’t be able to install the app on the device.

The device must be shut down and closed for Android Studio to actually wipe the data. The green dot next to the device name needs to disappear.
When you click the “x” to close the device tab, it can take a few seconds for the green dot to go away.

Once the device is shut down and closed, you can wipe all data and then install your app on the device again.

Hope this saves you a bit of time!
Thank you for reading!