The actual answer to your question is that thickness is better than density for rockwool/mineral wool.
The last page in my second link shows the differences in sound absorption at different frequencies based on thickness and density. Doubling the thickness results in an almost 400% increase in absorption at 125 Hz, while doubling the density is only about a 20% - 50% increase. It looks like the densest mineral wool isn't even available in the largest thickness, and 6" of the least dense wool (CW 4) has better absorption than 4" of the most dense wool (CW 8). Notice that the mineral wool does more at low frequencies than it does at high ones. Gypsum board is more for highs.
At Tetsujin points out in his comment, you could put a lot of money and time and material into a project like this and still not be able to block enough low frequency sound to keep your neighbors happy. Low frequencies are much harder to block or absorb. That's why a car with a powerful amp and some subwoofers can rattle your windows and reach your ears with the bass while it's driving by 20+ feet away. The capabilities of products to absorb sound is generally an average over the range of audible frequecies or even worse, taken at a specific frequency like 500 Hz or 1 kHz. My second link below has a chart of performance versus frequency and you should note that the performance is pretty poor below 400 - 500 Hz.
The thing you want to search for is STC - Sound Transmission Class. Usually an STC tied only to a specific material is a useless figure because the way the materials are used together in a structure has at least as large an effect on the final STC of the structure, but doing web searches for STCs of different materials will turn up different construction alternatives using those materials and their estimated STCs. A higher STC means more sound is blocked.
Here's an example of a construction and STC chart using mineral wool as an inslator.
Important guidelines for maximizing STC are to maximize non-resonant mass and to create damped air gaps. A concern that goes along with all construction that is particularly relevant to sound proofing is the fire retardant properties of all materials used. There is one easily available and affordable building material that has a good amount of non-resonant mass and excellent fire suppression characteristics and that is gypsum board, also called wallboard or sheetrock. Rock wool or mineral comes into play in creating damped air masses. If you leave an air gap between panels of gypsum board, then filling the gap with rock wool dampens the air mass and retards sound transmission through the air gap. The mass of air itself combined with the masses of gypsum in the gypsum boards partly absorbs and partly reflects sound. Mineral wool also has good fire retardant properties. The PDF linked above shows exactly this kind of construction using steel studs which can be a bit resonant but do not add any fire risk to the construction and are easier to install than wooden studs.
Some construction strategies to increase STC:
- Thicker gypsum board has a higher STC than thinner gypsum board.
- Two layers of gypsum board mated together has a higher STC than one layer.
- Thicker air gaps have higher STC than thinner (and I believe improve low frequency absorption).
- Thicker insulation has higher STC than thinner, and adding thickness is a bigger benefit than adding density of insulation.
- Lower stiffness will have a higher STC than higher stiffness, which is another advantage of metal studs over wooden.
- When mating layers of gypsum board, putting an energy absorbing material, like Green Glue improves the STC of the construction. Prelayered gypsum board with energy absorbing material in between the layers is also available.
- Generally you'll need an airtight seal where any wall meant to block or absorb sound meets other walls, the ceiling, and the floor. Many sources recommend leaving a 1/4" gap at those points when constructing the wall and filling the gap with acoustic sealant.
If you are renting where you live, there is essentially nothing you can do to stop sound transmission without violating what are terms that are almost certainly in your lease. It's probably best to not even try.
If you own a condo you may be able to make some changes as long as there are no condo association rules against it, but you probably want to check those rules (quietly) first. There may be a negative effect on the resale value of the condo.
If you own a townhouse or duplex then you are probably fine to make changes, as long as you don't mind possible damage to resale value (unless you undo all the work before you sell) and you comply with any relevant building codes. The legal and code enforcement ramifications of such work are outside the scope of this Stack.
Ideas that may help, in increasing levels of intensity:
- Use Green Glue to add a layer or two of 5/8" gypsum board to the existing wall, leave the 1/4" gap all around and fill with acoustic sealant. This (and all of these options) may present a challenge for any outlets, switches, heat registers, etc., on the wall in question.
- Attach studs to the existing wall, put insulation in between the studs and then put one or two layers (with Green Glue, ideally) of gypsum board on top of the studs.
- Install studs in front of the existing wall, not touching the wall, put insulation between the studs and add one or two layers of gypsum board to the interior of the studs.
- Install studs several inches from the existing wall, apply gypsum board to the side of the studs closest to the existing wall, put insulation between the studs, and then apply one or two layers of gypsum board to the interior side of the studs.
As you go through the above options from first to last, the cost and effort to build it, the amount of space you lose in the room, and the STC all increase.