This blur script is not available in URP / HDRP because Unity changed the way GrabPasses work in these versions, you COULD use the post processing stack to enable / disable 'Depth of Field' or use a canvas. I do have some example projects which may help you out! Do let me know via email, I'll gladly give you some advice!