Can you updated the parts inside a later model of iPhone with newer model parts? Or are the parts strictly meant for the phone that you have?

I prefer the older model of my iPhone 6, but since apple is always updating its software the older model phones get outdated. So if I were to order lets say some iPhone 8 parts and switch them into my iPhone 6 would that improve my phone, or would it just not work due to iPhone 8 parts being strictly for an iPhone 8?

Merry Christmas man

Your idea is a non-starter - No you can't update an earlier model to make it a later model. As you suspect parts are specific not generic across the range. Phones are not built to be upgraded - everything is soldered down and circuit changes between models make it impossible to swap anything.
Some specialists companies can increase the RAM but this requires specialist soldering and reprogramming equipment to allow the new memory to be recognised.