Given it's an MSI board and light 1 being CPU there's a number of steps you can take.
The most obvious is checking loose connections with either the 24pin connector on the motherboard and the 8pin that powers the CPU sometimes this is a split 4pin connector depending on your PSU. If those are good, check the rest of your connections. You'd be surprised to find these come loose if you didn't snap them in all the way and can prevent boot up.
Try checking and reseeding your memory modules using the correct slots most AM4 boards and pretty much any other board is labeled with A1 A2 B1 B2. So if you have 2 sticks make sure you're using A1 B1.
Check the graphics card is seated all the way. Ryzen chips do not have an integrated graphics module like Intel chips so you'll need to check that as well.
MSI boards always cycle through these lights on boot up to check various components before passing it over to windows but given the fact your CPU light is solid and you're not posting is either the CPU itself is faulty or the motherboard could be faulty. Which I'd recommend you RMA those parts and replace them starting with the CPU.
I didn't see any bent pins on your CPU either so while physically fine; sometimes a part is just a bad batch out of the whole lot and while it sucks it's not the end of the world and can be fixed without rushing out and paying someone to diagnose it to come up with the same answer.
If you're worried about data loss, I wouldn't stress much about either. Changing your CPU with the same model or even an upgrade won't effect that since that's handled by your HDD or SSD and if you have a back up you'll be 100% fine.
The only other issue you'll run into down the line after replacing your CPU or Motherboard would be having to reactivate Windows.
The most obvious is checking loose connections with either the 24pin connector on the motherboard and the 8pin that powers the CPU sometimes this is a split 4pin connector depending on your PSU. If those are good, check the rest of your connections. You'd be surprised to find these come loose if you didn't snap them in all the way and can prevent boot up.
Try checking and reseeding your memory modules using the correct slots most AM4 boards and pretty much any other board is labeled with A1 A2 B1 B2. So if you have 2 sticks make sure you're using A1 B1.
Check the graphics card is seated all the way. Ryzen chips do not have an integrated graphics module like Intel chips so you'll need to check that as well.
MSI boards always cycle through these lights on boot up to check various components before passing it over to windows but given the fact your CPU light is solid and you're not posting is either the CPU itself is faulty or the motherboard could be faulty. Which I'd recommend you RMA those parts and replace them starting with the CPU.
I didn't see any bent pins on your CPU either so while physically fine; sometimes a part is just a bad batch out of the whole lot and while it sucks it's not the end of the world and can be fixed without rushing out and paying someone to diagnose it to come up with the same answer.
If you're worried about data loss, I wouldn't stress much about either. Changing your CPU with the same model or even an upgrade won't effect that since that's handled by your HDD or SSD and if you have a back up you'll be 100% fine.
The only other issue you'll run into down the line after replacing your CPU or Motherboard would be having to reactivate Windows.