To prevent a possible loss of data on the memory card, the memory card should be logged off or ejected from the system before removing it.

Android 9
Step 1:  Open the  Settings
Step 2:  Tap on  Storage
Step 3:  Tap on  Unmount
  1. Open the Settings
  2. Tap on Storage
  3. Tap on Unmount

Android Instructions
Read more