Heat 2 T. butter in a skillet and cook onions on medium until starting to brown.
Lower heat and cook longer until caramelized. Add garlic for the last few minutes. Salt the onions generously. Let cool a bit.
Mix warmed onions/butter into the room temp butter.
Form a log and pop into the freezer or fridge to firm up.
Slather generously on hot sourdough bread.