Trouble with loading a sprite

Hello, I am fairly new to Unity and all I want is to load a sprite through a script and change it there. This is the code:

SpriteRenderer sr;
Sprite test;

void Start()
    {
        sr = GetComponent<SpriteRenderer>();
        test = Resources.Load<Sprite>("test.png");
        sr.sprite = test;
    }

However, when I print the name of the sprite it only shows “null”. So I thought that it just had to do something with the way I load the sprite.
Any help is appreciated.
Also, here is a picture of my file:
8214087--1072362--upload_2022-6-17_20-11-8.png

While I suggest getting away from Resources.Load, if you still want to use it, you should look at how it’s being used.

If you notice in Unity’s examples, they don’t include a file extension on the load call.

Thank you it worked. And I am just using the Resources.Load in a very small amount, so performance shouldn’t be a problem.