What you saw on the internet was a rough estimation of the bill of materials. That per unit cost would apply only if you are buying in bulk. Bulk=prob a few million units.
Apple does not sell repair units.
Apple does not sell iOS to non Apple manufactured devices.
So don't waste your time. Earn your bucks and buy a new one. Or wait for a few months and buy a second hand one.
If you are really desperate to build, I suggest you wait for a few weeks for somebody to crack their iPhone X. Buy it and fix it. You can start there.
Later on, when you become a Steve jobs you may build your own device.