The second black wire you connect to the switch is the switch feed and the unconnected black wire is the feed to the other loads. The connected wire feeds the other loads and the disconnected wire is the light feed if the light doesn't turn on.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.