How do I use an ATMega 328 (not P) chip with an Arduino board?
So I found the solution:

Here is the link to the method that worked for me. I think the reason my previous method didn't work was because of fuses for the clock as mentioned by Majenko in the comments.