Generic SingletonMonoBehaviour class.
You can use Package Manager or import it directly.
https://github.com/XJINE/Unity_SingletonMonoBehaviour.git?path=Assets/Packages/SingletonMonoBehaviour
Make inheritance & access simply.
public class Sample1 : SingletonMonoBehaviour<Sample1>
{
public int value = 0;
}
Sample1.Instance.value += 1;