Suppose I have a preference satisfy all basic assumptions, how to show consumer problem solution is unique
In that case you would still have a problem showing the existence of a solution. Without existence, it makes little sense to think about uniqueness. The reason a continuous utility function (implied by some of those preference assumptions you gave) has a maximum at all is because a continuous function achieves a maximum somewhere on a compact set, which in this case is B.

Luckily, we don't really have to imagine scenarios in which we have no information about the budget set. This is not some abstract set, but rather something very concretely defined as:

$B(p,w)=\{x \in \Bbb R_{+}^{n}: px \leq w \}$,

where $p$ is the price vector, $x$ is the demand, $w$ is the budget and $n$ is the dimension of the vector.

Luckily, this is always compact.

So, no, you cannot show there is a unique solution, because in that case you can't show there is a solution in the first place (using standard tools).

However,  you are correct in thinking that uniqueness itself does not hinge upon the compactness of the budget set.