Thank you for the opportunity to help you with your question!

Hello.

The two ways of increasing density are increasing pressure(Compressing) and lowering the temperature of an object.

This is simply what you have written , that you increase density by increasing the mass and decreasing the volume. When you apply pressure on an object(Compress it) you simply reduce its volume and when you lower the temperature you cool/freeze the object you increase the mass which is the same as what you have written.

To decrease the density you increase the temperature( heat the substance).

This will increase its volume but the mass will remain the same therefore density will reduce.

Hope this one helps you understand what you have written. If you need more clarification feel free to ask.

Thankyou.

Regards

Please let me know if you need any clarification. I'm always happy to answer your questions.