Session has been terminated Exception

Hi guys I am learner of appium can somebody tell me why i am getting this error .when i worked with UIAutomater2 taking the locater first time and executing the script successfully. when i try to locate some different element one more time ,I am getting

  • session has been expired

may i know what is the caused of that error?

Heading

.