One important method of storytelling amongst modernist writers like Woolf and Kafka is their use of stream of consciousness narration. Many modernist writers wished to capture the world precisely as human beings perceive it: through tiny details that overwhelm an incessantly wandering mind. Humans typically do not think like the traditional narrators in books. We do not sequence thoughts in an organized and chronological order, but rather allow them to pass through us, regardless of whether not they are related or even make sense. As such, modernist society concerned itself with portraying the world accurately as we perceive it — along with all the fear, anxiety and confusion that comes along with it.
For example, in Kafka's The Metamorphosis, the main protagonist wakes up as an insect. Instead of proceeding with an action induced narrative, Kafka makes Gregor, now in bug form, learn the difficulties and pain of his new way of life in real time. Similarly, Woolf's short story The Mark on the Wall does not feature much regarding the discernible action. Instead, the narrator has an unhealthy fixation with what a spot on the wall is. We follow their mind as it hypothesizes different possibilities, which then leads their mind to thoughts of society and politics, quite removed from the original topic.
So, one way these stories both comment on modern society is their use of their main character's personal pain, rather than joint, collective pain. We can guess at the trials that others in these character's universe are going through, but, through the curse of personal subjectivity, we can only know our pain. What do the two endings of stories have in common? What type of anxiety do they represent?