Gap between the stairs and the wall.
Between a staircase and a wall you're supposed to have a piece of trim called a skirtboard to fill that gap. It functions like a baseboard to keep peoples' shoes & feet from scuffing up the walls.
I suggest you look for a book called Building Stairs by Andy Engel. Many libraries have it. Staircases are really complex with more parts than I realized before getting this book!