This question already has an answer here:
We are a South African couple with 5-year multi entry visas expiring in February 2024. For how long do we need to be out of the UK before we can return again? We intend spending the maximum of 6 months there on each visit if possible. We intend buying our own property there.