Erythema nodosumhttps://en.wikipedia.org/wiki/Erythema_nodosum
Erythema nodosum is an inflammatory condition characterized by inflammation of the fat cells under the skin, resulting in tender red nodules or lumps that are usually seen on both shins.

Erythema nodosum is diagnosed clinically. A biopsy can be taken and examined microscopically to confirm an uncertain diagnosis. A chest X-ray should be performed to rule out pulmonary diseases, in particular sarcoidosis and tuberculosis.

  • It appears as a painful erythematous nodule on the leg.
  • Erythema nodosum in Tuberculosis. Tuberculosis is one of the important causes of Erythema nodosum
References Erythema Nodosum: A Practical Approach and Diagnostic Algorithm 33683567 
NIH
Erythema nodosum is the most common form of panniculitis and is characterized by tender erythematous nodules mainly in the lower limbs on the pretibial area. The exact cause of erythema nodosum is unknown, although it appears to be a hypersensitivity response to a variety of antigenic stimuli. Although the etiology is mostly idiopathic, ruling out an underlying disease is imperative before diagnosing primary erythema nodosum. Erythema nodosum can be the first sign of a systemic disease that is triggered by a large group of processes, such as infections, inflammatory diseases, neoplasia, and/or drugs. The most common identifiable causes are streptococcal infections, primary tuberculosis, sarcoidosis, Behçet disease, inflammatory bowel disease, drugs, and pregnancy.
 Panniculitis in Children 34449587 
NIH
Panniculitides form a heterogenous group of inflammatory diseases that involve the subcutaneous adipose tissue. These disorders are rare in children and have many aetiologies. As in adults, the panniculitis can be the primary process in a systemic disorder or a secondary process that results from infection, trauma or exposure to medication. Some types of panniculitis are seen more commonly or exclusively in children, and several new entities have been described in recent years. Most types of panniculitis have the same clinical presentation (regardless of the aetiology), with tender, erythematous subcutaneous nodules.
 Erythema nodosum - a review of an uncommon panniculitis 24746312
Panniculitis, an inflammation of the fat layer under the skin, is a rare condition usually showing up as swollen nodules or patches. Erythema nodosum (EN) is the most common type, often triggered by various factors. While around 55% of cases have no clear cause, common triggers include infections, medications, certain diseases like sarcoidosis and inflammatory bowel disease, pregnancy, and cancer. EN usually appears in teens and young adults, more often in females. It's often preceded by a general feeling of illness lasting one to three weeks, with symptoms like fever and upper respiratory issues. Then, red nodules appear, usually on the outer sides of arms and legs, causing pain. EN's exact cause isn't fully understood, but it's believed to involve immune complexes in small blood vessels of the fat layer, leading to inflammation. Typically, a biopsy shows inflammation in the fat layer without damage to blood vessels. Even without specific treatment for the underlying cause, EN often resolves on its own. So, most patients need only supportive care for their symptoms.