Do I need to be working to apply for the EU Settlement Scheme?
No, you do not need to be working to apply for pre/settled status. The only requirement to apply is that you were a resident in the UK before the 31st December 2020.
The EU Settlement Scheme checks for residency, not activity in the UK. It does not matter if you are self-employed, not in work, self-sufficient or a student during your qualifying period. For pre-settled status, residence in the UK before the 31st December 2020 will suffice. For settled status, you must demonstrate you have been physically present and living in the UK at least 6 months every 12 months for 5 years in a row.
See also the explanation of continuous residence.