The word "flesh" here is a metonym for the sinful nature. The sinful nature is spoken of as if it were a person who does things. The abstract noun "works" can be translated with the verb "does." Alternate translation: "the things the sinful nature does" or "the things people do because of their sinful nature" or "the things people do because they are sinful" (See: [[rc://en/ta/man/translate/figs-personification]] and [[rc://en/ta/man/translate/figs-metonymy]])