Same pan, a little oil will be left from the salmon, don't add any more oil instead add half of the butter (1 tablespoon).
With the heat on medium, cook the onions until soft, around 4 minutes. In the last minute or so, lower the heat and then add the garlic. If the heat is not low the garlic will burn so no sooner, shift the pan off the stove for a couple seconds to cool the pan down a little.
Add the lemon juice and capers, give the pan a swirl or ligh mix. Let the liquid cook down a bit, about 2 minutes and in this time, bring the heat back up again to prepare it for the wine so get the heat to medium.
Stand back a bit and pour in the white wine, on medium heat it will sizzle. Let it cook in and reduce just for about 1-2 minutes no more.
Add the remaining tablespoon of butter and as it melts add the cooked spaghetti. Use a pair of tongs to lift the pasta as you mix it into the sauce. It's best to do this in two or three parts depending on big your pan is. Gradully pour in the reserved pasta water, making sure it's all combined.
Serve with the salmon, black pepper and your preferred freshly chopped herb.