Magical Realism, Modernism
Unfortunately "stories that make you totally afraid of being suddenly transformed into an cockroach" is not actually a real genre. We checked.
Written in 1912 and published in 1915, Kafka's Metamorphosis falls squarely in the genre of Modernist fiction. The fate of Gregor, lonely traveling salesman, expresses the common Modernist concern with the alienating effects of modern society. Like other Modernist works, the story uses the stream-of-consciousness technique to reflect the psychological complexity of its main character.
Kafka's novella is also notable as a modern work of magical realism with its juxtaposition of fantastic occurrences—the guy turns into a bug—with a realistic setting.