Although this question already has an accepted answer, I submit this as food for thought.
Let’s understand this passage. The first thing to keep in mind is the Biblical definition of death. Death means separation.
GEN 2:17 But of the tree of the knowledge of good and evil, thou shalt not eat of it: for in the day that thou eatest thereof thou shalt surely die.
Adam was told how ‘death’ would enter - by ‘eating’ from that tree. And he did eat. And he ‘died’ that day. That is, He was instantly separated from God.
GEN 3:9 And the Lord God called unto Adam, and said unto him, Where art thou?
So, we are all born ‘in’ Adam. We are all born ‘separated’ from God. We are all born ‘dead’ [separated]. But, how then does Romans equate this to ‘sin’? It’s all about what happened when man ‘ate’. By eating, man decided that ‘he himself’ would be his source for righteousness - and in doing so became unrighteous - Man became ‘sin’. (Sin = noun).
So, ‘man’ became ‘sin’[noun]. That is, man became unrighteous
1 JOHN 5:17 All unrighteousness is sin: [snip]
And, it is through this ‘state’ of unrighteousness, ‘sin-noun’, that death (that is, separation from God) comes to all.
One issue we have is the “meaning’ we associate to words like ‘death’, ‘sin’, etc. so you can easily get the wrong ‘picture’. So some have the idea ‘we are born guilty’ - for a ‘sin’ we didn’t even commit - make sense?
And one ‘root’ cause of this incoherent interpretation is confusing ‘sin-noun’ with ‘sin-verb’. Sin ‘verb’ is what you do. Sin ‘noun’ is what man is. And, they are very different.
The ‘sin’ that you do, all ‘sin’ that you do - is in the ‘flesh’. And, there is a ‘price’ for this. Death. Physical death. Separation of the [physical] body from ‘you’ (spirit/soul). Hence the penalty under the ‘Law’ for ‘sin’, those you ‘did’, was death. The wages of sin [verb] is death. And, all bring this on themselves. But it is that ‘other death’, that separation from God that is the most crucial. We need God’s Righteousness, not our. And that requires a choice.
So, to understand Romans 5 - actually to understand all of Romans, you need to differentiate between ‘sin’[noun] and sin [verb]. With the trouble being you only ever only see the word ‘sin’. And, most times in Romans it’s a noun - but many interpret it as a verb - and this greatly influences interpretation!
We are all born ‘under Adam’ - separated from God. (Spiritually dead.) And, the only solution is to ‘die’ - and be reborn, born again, ‘under/in’ Christ. And, that’s exactly what Romans tells us.