The power supply is used when we cannot use a voltage regulator, such as when we need high current or voltage. A power supply doesn’t regulate voltage so it can be unstable. A voltage regulator is used when we need a constant voltage. Voltage regulators are more advanced but the power supplies can be used as voltage regulators by using resistors and capacitors.