How should a replacement outlet be wired?
Since you measured 120v you probably have an open neutral. I find open wiring most often when back stabs are used. A back stab is the push in type of connection. I don’t like back stabs and think they should be illegal but have made many house payments fixing them. The problem is usually on the last working outlet or first non working outlet. Bathrooms and kitchens have this problem quite often other than that space heaters will usually cause the problem. It could be a broken wire or a wire that came out of the nut but that is rare compared to bad back stabs. Also don’t assume a non contact voltage tester is correct and you have 120v it could be a phantom voltage on a circuit that was turned off at the breaker. Note as others have said you had the wires correct with black wire on the brass colored screw , white wire on the silver screw and bare copper or green insulation going to the green screw. If you put white and black on the same side it would have tripped the breaker if the breaker was tripped you need to turn it fully off and then on to reset it.