The ozone layer would then of course shrink worldwide, yes, and this would collapse a large part of photosynthesis, causing a probable food chain collapse, but we're impressively adaptable and at the very least, millions of human beings would stay alive sustaining themselves with food grown or raised under adaptive conditions. The rest of nature would also adapt based on what survives, as it always has with previous cataclysms. This would probably help us too.
In other words, humanity would suffer terribly and billions would probably die, especially since this kind of event would be so sudden and unstoppable, but we wouldn't all die and the many survivors would repopulate as the ozone layer regrows too (which would happen over a few decades since it regenerates itself from solar radiation). But yes, bad. There is a theory that a gamma ray burst caused the Permian-Triassic event, the Great Dying, and 95% of life on Earth was extinguished during that time, though much of it was much less adapted to unexpected radiation than many lifeforms on Earth are now, so things could be less severe next time.