The other reason for staff to terminate a service and I'm going use Thameslink as a example here:
Firstly they board via the rear cab on the Class 700 and should make a announcement stating the doors are about to be closed although the driver can also make this announcement then the station staff request the driver to close the doors using the cab to cab comms.
Once the doors have been closed, they then walk though the entire train.
Their job at this point is to make sure that 1. ensure no passengers are still onboard and if so they use the local door release on the GOP to allow the passenger off the train, 2. To carry out a security check by carrying out the HOT
procedure and also 3. To check for any lost property.
Once they have completed this, they then confirm to the driver that the train is secure and there's no problems.
Upon this, the driver then departs to its next location.
The terminating procedure is different per each type of train for example, ex BR Mk3 EMUs eg Classes 313, 317, 365 etc all had a rubber button at the end of one coach that when pressed then locked off the doors in that coach, Class 377s etc use a T key to carry this out so the procedure is different depending on the train involved.
*For those wondering what the HOT procedure is, it's short for Is it Hidden? Is it Obvious? Is it Typical? This procedure has to be carried out if the train is being taken out of service with no exceptions.