How do I get SeralizeField

I’m trying to make a Christmas game for my class, but I can’t figure out how to get serialize field to work.

Make sure UnityEngine is imported somewhere above your class

using UnityEngine;

Then, replace public with [SeralizeField]

[SerializeField] int coolNumber;
// SeralizeField shows the field in the inspector, but the field is still private, so other classes cant read or view it

Hope this helps!