Dark, non-itchy patches on the neck are often due to
acanthosis nigricans, especially if the skin feels a little thicker or velvety. It is commonly linked with insulin resistance, overweight, prediabetes, or diabetes, but it can also occur from friction, some medicines, hormonal conditions, or sometimes with no identifiable medical cause. A skin doctor can usually recognize it on examination. The American Academy of Dermatology notes that a velvety dark band on the neck can be an early sign of prediabetes or diabetes.
AAD guidance
Your stomach problem is not usually the direct cause of neck darkening, but mention it at your appointment, particularly if it includes persistent pain, poor appetite, vomiting, unexplained weight loss, or changed bowel habits.
The change from darker to lighter at times can happen with dryness, sun exposure, friction, and lighting, but it cannot confirm the cause. Recent systematic-review evidence supports acanthosis nigricans as a marker associated with insulin resistance/metabolic syndrome (PMID: 42501242), so checking glucose is sensible.