When you use a file from SharePoint as your Power BI data source, as a first step you need to connect to it.
To provide your credentials go to your Semantic model and select Settings.
Under Data source credentials you can connect to your Sharepoint file.
Select OAuth2 as the authentication method and set your privacy level then click on Sign in.
If you receive an error message like this
that is usually because you are trying from Microsoft Teams or from a browser that prevents the pop-up windows. To finish the OAuth2 authentication Power BI tries to open a new window where you can provide your SharePoint credentials.
To fix the problem, make sure your browser allows pop-up windows from powerbi.com.
Go to your browser Settings and under Privacy & Security disable pop-up blocking or add the Power BI service URL as an exception.