Indeed, there are a lot of variables that affect the end result. The trick is to change them one by one, until you find an optimum value for each, then keep everything as constant as possible.
The only thing that will always vary from a negative to the next is the exposure time. But that's easy to nail down. Make a few test prints with different exposure times, process them
exactly as you would process the final prints (including toning, if you plan to do that with the final prints), then let them dry over night. Assess them the next day. That's all.
It's really easy once you get the hang of it.

Anyway, the second print doesn't look bad at all. You're getting very close. I think it needs just a bit more contrast, but that depends entirely on the negative you're using - it's not a vandyke processing error.