In theory one effect (no idea who provides it) could do the job. Without it you must use Photoshop's standard functions. This explanation doesn't cover how to make the shape easily changeable and still preserve the effect, it's built around a fixed shape - a dog in this case.
Get a black shape which you want to decorate. Remove its background. Have a separate background layer, but the shape must have transparent background in its layer. The image must have RGB color mode. Change it, if it's grayscale.
If you want the coarse appearance of your examples, the image must have low resolution. Here the dog is 120 px wide.
The dog is duplicated and the copy is colored to grey with curves. The background is changed to black. Grey can be seen against it:
Insert layer style outer glow to the black dog. Let the glow color be opaque white. See the dialog:
Insert a fully opaque, but wider white outer glow to the grey dog. Duplicate the black background and merge it with the grey dog layer. Fill grey dog's area with solid white. Here the white is painted:
Insert a new layer for colors. Paint solid colors well beyond the white area of the grey dog layer. Blur the colors to get gradients.
Copy the grey dog layer to he clipboard. Insert a layer mask to he colors layer, paste the clipboard content to the mask. You get the layer mask onscreen for edits by clicking the layer mask icon and holding Alt at the same time.
Bring the black dog to the top:
Insert a new top layer, paint into it white dots with a soft brush. Creating a scatter brush could be useful because manual insertion easily follows some unconscious, but detectable and thus unwanted pattern. Here the dots are inserted manually one by one.
The grey dog layer is essentially the background in use. You cannot remove it. But you can copy it to its own layer mask to make other backgrounds possible without thinning the effect: