Yes, in my opinion, providing a safety net for its citizens is a valid function of government, to the extent it is the only entity that can act as an "insurer", in essence. Yes, social safety nets do have some "socialism" about it, but it meets the minimums of the mission of government.
The key issue is avoiding benefiting people who do not deserve the support in terms of the criteria set by legislation.
The safety nets, all of which are necessary, would be:
Unemployment buffer - Expanded benefits, given job search requirements, would be provided on a loan basis beyond what is provided by payroll taxes for the purpose. Retraining required and provided, on a loan basis. Welfare/Food - Extensive education programs would be required, as also would public service, for all able people. Welfare is not to be given to those who are able, who would need to get work. See unemployment requirements (linked above).
Very tight controls, as every dollar spent on sloth is a dollar wasted forever
Retirement safety net - Yes, social security payments should be required, but on an honest true funding basis, where the funds aren't diverted and there is a legitimate positive return (and it is not made negative through taxing the benefits of anyone).