First, there was no PowerBook in 2008, the last one was produced in 2005 and being that it used the PowerPC processor [PPC). For the 2008 model year, you could have either the MacBook [White or Black Unibody) or the MacBook Pro (not unibody). The highest version of OS X for that vintage was 10.7.5 (Lion) and 10.11 (El Capitan) respectively.
If was a PowerBook or the White/Black unibody, it couldn’t run Yosemite; but the MacBook Pro could.
Now, if you are booting an OS and it shuts off mid-boot in the manner you describe, you have a hardware issue. If the OS installation failed, you’d get an error or it would hang. Since it’s powering off, it’s definitely pointing to hardware.
What could it be?
From past experience with these models, it could likely be the CPU or GPU. You can try booting into Diagnostics. However, this vintage of MacBook could actually boot the Ultimate Boot CD. Since it boots up in a text environment, it doesn’t tax the GPU from the outset and you can run the diagnostics on the CD to help narrow down the problem.
However, since it’s 15+ years old now, it’s likely to be a lost cause and you will probably get more value for it as parts on eBay.