Let me introduce you to the Commonwealth of Nations
https://en.wikipedia.org/wiki/Commonwealth_of_Nations
These countries choose voluntarily to hold ties with the UK, and each other, and some accept the UK's monarch as nominal head of state, but don't be mistaken; they are all fully independent countries. Some are republics, some are kingdoms with their own monarch. They value each other's friendship, shared values and heritage, but they're not beholden to the UK or each other.