When determining the sentence for an assault offence, the court has to assess both 'harm' and 'culpability'. If both are seen as 'higher' it's classed as a 'Category 1' offence. If one of the two factors is seen as 'higher', but the other is 'lower', then it's 'Category 2'. If both are seen as 'lower' it's 'Category 3'.
If you're only being prosecuted for 'GBH' (rather than 'GBH with intent') a Category 3 offence might well attract a non-custodial sentence. A Category 2 offence would receive a custodial sentence (but it might be suspended). A Category 1 offence would receive an immediate custodial offence.
(See pages 7 to 10 here:
https://www.sentencingcouncil.org.uk/wp-content/uploads/Assault_definitive_guideline_-_Crown_Court.pdf )
If you're being prosecuted for 'GBH with intent' an immediate custodial sentence is effectively inevitable. (There would have to be VERY exceptional circumstances to avoid it, such as you having attacked your child's killer, who'd taunted you about the matter, and you also having sole responsibility for the care of another child who's severely disabled. In around half a century of following court reports, I've only ever seen ONE case where someone convicted of GBH avoided immediate custody).
[See pages 3 to 6 in my link]