The Greek word anomos

Similar to the Greek adjective “anomos,” the Greek adverb “anomos” meant “lawless,” “without law,” and “criminal.”  This term is found only in Rom. 2:12Rom. 2:12
English: American Standard Version (1901) - ASV

12 For as many as have sinned without law shall also perish without the law: and as many as have sinned under the law shall be judged by the law;

WP-Bible plugin
and it describes people (Gentiles) who “sinned without the law.”  The Gentiles did not have a written code from God, but Paul said they were still guilty of sin.