A. Monitor your device's resource usage and close any unnecessary applications to free up memory. B. Try running smaller code snippets to see if the issue persists with less complex tasks.