Nakedness was not the problem... Because prior to eating ...
GEN 2:25 And the man and his wife were both naked and were not ashamed.
The awareness of ‘nakedness’ came about because...
GEN 3:7 Then the eyes of both were opened, and they knew that they were naked.
The “key’ to understanding this verse is helped by looking at the Hebrew word behind ‘knew’. yāḏaʿ. Which means ‘perceived’, or an ‘inward intuition’.
What were they ‘sensing’? We find the answer to this in Romans. Paul is explaining that all have an intuitive inward sense of Gods wrath, which comes from them intuitively ‘knowing’ that they are unrighteous.
Rom 1:18 For the wrath of God is revealed from heaven against all ungodliness and unrighteousness of men, who hold the truth in unrighteousness; 19 Because that which may be known of God is manifest in them; for God hath shewed it unto them.
So after eating, because of their now unrighteous state, they had an inward ‘sense’ of Gods wrath, hence they were afraid, fearful, of what? - Gods wrath. So they hid.
GEN 3:10 And he said, “I heard the sound of you in the garden, and I was afraid, because I was naked, and I hid myself.”
It was their unrighteousness that needed covering. The Hebrew behind ‘naked’ (ʿêrōm) means uncovered. God is righteous, and the presence of righteousness exposes unrighteousness. But it’s this inward ‘perception’ that man tries to suppress, hence the fig leaves.
Man (Adam) was righteous. He had Gods righteousness. Via his spirit. Adam communed with God is his spirit. But, when he ‘ate’, his spirit (he) died - instantly, just as God said would happen. Man became unrighteous (Sin). And covering with leaves was an outward expression of an inward state.
Man became sin. All unrighteous is ‘sin’. So the issue wasn’t disobedience (sin - verb), but rather unrighteousness (Sin-noun). It wasn’t so much about what man ‘did’, it was about what man had become. And, through unrighteousness, Man was now separated from God. And that unrighteousness is what religion tries to reverse, and what unbelievers try to suppress