Welcome to the forum!
That's happening because you have a bunch of individual paths. You need to connect the end nodes. Although it will fill if not every single path is connected, it's ideal to have a completely closed path.
1 - Select 2 paths which you want to connect, with the Node tool (hold the Shift key)
2 - Using the Node tool, drag a tiny selection box around the 2 end nodes, to select them both
3 - Click Join Selected Nodes button on the Node tool control bar (looks like this
)
If you find some of them won't join, look closely at the end node. Sometimes the Pen tool creates 2 nodes on top of each other, at the end of a path, and you have to delete one of them.