Filling gap between drywall and stairs
You're meant to install a skirtboard along the wall, cut to fit the stairs.
Here's a picture from Building Stairs by Andy Engel (I feel like he should hire me to market his book with how often I recommend it to people) showing installing a skirtboard onto the wall.