Uploaded bootloader once to ATmega328 and can't do it again with the same setup

I am trying to burn a bootloader onto an ATmega328 on a breadboard with the internal 8MHz clock and I can't do it, I've done it once already with a chip from the same package I ordered, but it doesn't want to work anymore. I've used the tutorial here by Arduino:

I followed that tutorial the same way I did before and the arduino IDE gives me this message when I try to burn the bootloader:

avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

Error while burning bootloader.

I tryed looking at the wiring and it is this:

the same one as the tutorial.
I want to bootload this atmega because I think I gave the other one too much voltage and it burned out or something.
Can someone help me?

I'm also using an Arduino Uno to program this. I've used the ArduinoISP example sketch and I've uncommented the line:

//  #define USE_OLD_STYLE_WIRING

Am i correct in interpreting your post as saying you did burn bootloader once successfully on the chip, but the second time you tried it with the same chip, you got signature error?

In that case:
What board did you have selected when you did "burn bootloader" the first time? My guess is that you had a board definition for a board with external crystal selected, so when you burned bootloader, it set it to use the crystal, and now since there is no crystal present, it cannot be programmed. If this is what happened (see below for how to confirm) you need to either give it a crystal, or a clock signal in place of crystal, in order to program it, even to set it to use the internal oscillator.

In any event, go to preferences and under "Show verbose output during:", check the "upload" box - then when you try it, it will show you what signature it sees - 0x000000 would indicate either wiring mistake, or chip set to use crystal when no crystal is present (what I described above). If it is getting 0x1E9514, that means you have an atmega328, not an atmega328p - in this case, use MiniCore (see below) and select the atmega328 as your processor. If it's 0xFFFFFF, that's a wiring problem (or a bad chip)

I recommend installing MiniCore (GitHub - MCUdude/MiniCore: Arduino hardware package for ATmega8, ATmega48, ATmega88, ATmega168, ATmega328 and ATmega328PB) if you haven't already - that has board def's for all the x8-series ATmega parts (including of course the 328p) with every clock source imaginable, with option for serial bootloader, or no bootloader (for ISP programming).

Also, your diagram doesn't show the necessary 0.1uF ceramic cap between Vcc and Gnd, and between AVcc and Gnd. This is necessary - without them the chip may hang or reset intermittently (I suspect you got that wiring from the ArduinoToBreadboard tutorial, which we've been trying to get them to correct for ages - the official tutorials in general often omit decoupling capacitors, which are necessary for reliable operation). These should be located right next to the chip (one on each side). This is not the cause of your problem currently - you get a different error if the chip is resetting due to insufficient decoupling during ISP programming - but it would be the cause of problems once you got further into your project. In general, unless the datasheet says otherwise, you should put a 0.1uF ceramic cap between power and ground of any IC you use - it's purpose is to counteract the inductance of the wires/traces supplying power to the chip, as the power a digital IC uses can almost instantly go from near-zero to tens or hundreds of milliamps; without the cap there, this can result in a brief glitch in the power supplied to the chip which causes it to reset or otherwise misbehave.

I'll try putting the capacitors there. Does proximity to the microcontroller matter, or can I put them anywhere on the breadboard? And I used ATmega328 on a breadboard (8MHz internal clock) when I burned the bootloader. I'm quite sure the chip is fine, because I tried another one in the same package and it also didn't work.

And I did use alligator clips to connect a crystal from another arduino board that I had lying around and used it to see if that was the problem, and it wasn't.

Yes, proximity matters a lot. Also, alligator clips and a crystal isn't really assuring... Why not put it all in the breadboard?

Thanks. I tried using the capacitors and it bootloaded. I did, however, try another chip. I was getting the message 0x000000, so I probably accidentally set it ti use crystal.

The wires/connections to a crystal (and it's loading caps - you do need those, otherwise the crystal won't oscillate) need to be as short as possible - crystal should be on the breadboard next to the chip, and loading caps direct from that row of holes to the nearest ground.

Crystals+loading caps, and decoupling caps, are the two cases most hobbyists will encounter where layout and length of connections really matters.