It depends a bit though. Usually the first mandatory year is manufacturer warranty and the second and further years (where applicable) seller warranty only. So Apple is only on the hook for this if you bought from them and even then the burden of proof is on the consumer.
https://www.apple.com/uk/legal/statutory-warranty/uk/