The Information Commissioner's Office (ICO) has published detailed guidance on special category data. This is aimed at data protection officers and those with data protection responsibilities in larger organisations.
The guidance sets out what special category data is, the rules which govern it, the conditions for processing it, and the substantial public interest conditions (there are 23 set out in the Data Protection Act 2018).
The guidance emphasises the importance of identifying special category data and approaching it carefully. If your purpose is not covered by any of the processing conditions and you cannot obtain valid explicit consent, you cannot process the special category data. The ICO states that "there is more to do when processing special category data" and "it is worth taking the time to get it right".