Where someone coming back to the UK from abroad has to pay for Covid quarantine in a hotel, there is no help available from welfare benefits, but the government have a hardship loan available for those who would face significant financial hardship if thy had to pay it in a lump sum.
Those who are eligible for hardship arrangements, could be offered a repayment plan, so that they can pay in monthly instalments. They might not be asked to repay all of the fees.
The rules are quite strict. Hardship arrangements are only available if the travel was for essential purposes, such as work, education, urgent medical treatment or compassionate reasons (eg. to visit a close family member who is dying or critically ill, or to attend the funeral of a close family member or to avoid injury or illness or escape the risk of harm).
See here for information.
If someone is stuck abroad they could contact their travel insurer and/or the British Embassy or Consulate in the country they are stuck in for advice.