School refusal -- not the same thing as Truancy -- is a manifestation of an adaptive (or maladaptive) response to an anxiety provoking stimulus.
Namely, being amongst a horde of uncivilized primates.
Jokes aside, I would usually provide one of the following links & discuss validating the kids concerns, hearing them out, rehearsing obstacles, etc
In the Era of COVID, I just wanna say: "maybe kid is onto something."
Maybe they always were.
https://www.theguardian.com/commentisfree/2023/feb/06/you-cant-fix-school-refusal-with-tough-love-but-these-steps-might-help
https://www.health.harvard.edu/blog/school-refusal-when-a-child-wont-go-to-school-2018091814756