So I moved into my new apartment about a month and a half ago. I immediately noticed the back door deadbolt didn't work, but I thought nothing of it since there was an additional lock that did work. I've come to find out flies are coming into my apartment through a gap created by this damaged frame. I'm trying to figure out how to do a quick repair. I tried putting a small buffer between the door and frame but it prevented the door from shutting and ultimately proved a failure. My next bet was to buy wood to fill the space and repair the deadbolt which I believe would fill in the gap. Before taking that on I was looking for some professional advice as this is pure amateur ideas without any experience. Below are shots of the door frame.