Can you put a glass screen protector on an already cracked phone?

I have a iPhone 7 plus with a hairline crack across the side and was wondering if a screen protector would still work to prevent further cracking

Well why did you crack it in the 1st place idiot

You probably wouldn't know until you try…