NullReferenceException Ruby's Adventure 2D

I know NOTHING about programming, I’m doing the Ruby’s Adventure 2D tutorial and I’m at the collectible health stage. I copy and pasted the script from the tutorial, but I keep getting this error:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.GameObjectInspector.ClearPreviewCache () (at <25578071f6e44201aac745680e5c8dfc>:0)
UnityEditor.GameObjectInspector.ReloadPreviewInstances () (at <25578071f6e44201aac745680e5c8dfc>:0)
UnityEditor.GameObjectInspector.OnForceReloadInspector () (at <25578071f6e44201aac745680e5c8dfc>:0)
UnityEditor.Tilemaps.GridPaintPaletteClipboard:OnDisable() (at Library/PackageCache/com.unity.2d.tilemap@1.0.0/Editor/GridPaintPaletteClipboard.cs:347)