A. Close other apps running in the background to free up RAM. Use the recent apps button to swipe away unused applications.
B. Reduce the video resolution while editing. This can help improve performance. Go to Settings > Video Quality and select a lower quality.