These are pseudounipolar neurons which have cells bodies within the dorsal root ganglion. They have one axon which splits into two branches, a peripheral branch (which extends towards the peripheries) and a central branch (which extends centrally into the spinal cord/brainstem).
Some first-order neurons have specialist receptors called nociceptors which are activated through various noxious stimuli. Nociceptors exist at the free nerve endings of the primary afferent neuron.
https://teachmephysiology.com/nervous-system/sensory-system/pain-pathways/