If you are working as a contractor then your end hirer is responsible for determining your IR35 status and ensuring that you are paid and taxed correctly based on their assessment of your employment status.
Your end hirer has many legal responsibilities to you, but the most important one is seeing that you are paid the agreed amount for the work you are contracted for and they must pass their opinion to you and also your agency (who is obliged to deduct income tax and National Insurance as the fee payer).
In theory this is quite straightforward, but regulation set by HMRC known as IR35 requires them to assess whether your relationship with them is genuinely independent, or more like employment.
As such they are responsible for scrutinising every contract with reasonable care. After doing this they must provide an SDS that clearly states the decision they have made and the reasons behind it. They should then pass this to you and your agency if applicable.