Get variable of Gameobject child which is being collided with

So i’m making this 2d marble run and i have these “gravity areas” which have a different gravity when you enter them.

The problem is that the areas have different gravityX and gravityY values so how do you get an individual child’s (which is being touched by one of the marbles) variables?

I currently have no code.

this might work idk

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Example : MonoBehaviour
{
    void OnCollisionEnter2D(Collider2D other)
    {
         Debug.Log(other.gameObject.name) 
    }
}

and to use this just instead of debug use

if (trigger.gameObject.name == "LowGravity")
{
    lowgravity= true;
}