My mixer has a built-in noise gate and I've had good success eliminating many "ambient" sounds around me. I don't live in an apartment building but most of my neighbors are not far away. The gate helps to cut down on noises from outside. I record in the same room with my refrigerator, and I no longer feel the need to unplug the fridge, thanks to the noise gate. The gate can even block out the noise my furnace makes when it comes on. However, the gate does nothing for louder sounds like cars, planes, and trains. All of which can be present in my area. Most DAWs come with noise gate plugins you can experiment with to see if they help.
Building an iso booth may help. In your case, you're looking to keep sound out, so you'd want to make sure the booth has walls that are somewhat thick. The key to keeping outside sounds from being picked up shaving enough mass between your recording area and the outside world. Just building a box and soundproofing the inside of it may not be enough.