There are over 20 pieces of legislation that apply to dog ownership in the UK. A very good summary can be found on the Blue Cross website as follows (please note this guidance only applies to England and Wales):
https://www.bluecross.org.uk/advice/dog/wellbeing-and-care/dog-laws-uk