Is it recommended to have a free-standing background chapter to avoid cluttering the main text with different topics?
I don't know if there is a broad consensus but I have seen background chapters in several papers I read recently in my field (computer engineering). If you have the space to spare (I guess a master thesis will not have a strict page limit?), this seems perfectly reasonable. Make sure to only describe things that are relevant to your research, and highlight/foreshadow how they will matter to the rest of the paper. This will also help clearly demarcate your own contribution from prior work.