Gap between floor, wall and stair
OK - based on picture at the bottom you need to:

extend the trim - marked in yellow
mud/tape/sand pant the area in red all the way up into the top trim

That is the easy option and could look great for years.
The other option is buy trim/pine-board and cut out a triangle so that you form a rectangle where that wall is cracking.   Based on the indention and cracking it looks like the wall above may be sitting on something less stable and moving - that triangle looks awfully out of place and I usually see that on wall over concrete.
Note that if this is moving around seasonally that much you may just need to cover the entire area with something more flexible - wainscoting, planks, etc.