Dealing with instantiated dependencies.

So a general question:
How to deal with dependencies that is instantiated?
Say I have two functions:

public class Manager : ScriptableObject
{
    private var data;
    private void GetDataFromTextAsset() => data = BuildData();
    public bool IsValidInput(var input)
    {
        if(data.SomeAspectIsTrue)
            return true;
        return false;
    }
}
public class User
{
    public void SomeFunction(var input)
    {
        if(_manager.IsValidInput(input))
            DoStuff();
    } 
}

what is the proper way to solve such a dependency, that decouples the two classes, is scalable and testable?
I want to use Zenject, but I’m not sure if that is good for this specific issue
also i guess singletons are out the window?

Do you want to test the scriptable object or the logic inside User?

You could rewrite your scriptable object to just hold data so that it has no logic such as IsValidInput since that depends on some text input.

Then your user class could mock / inject a plain old C object (POCO) which makes it easy to unit test.

If you want to validate your scriptable object loading the text asset properly, you can use OnValidate() although that won’t run as a unit test.