The current power bi pbix file connection credentials are stored locally.
Therefore, it means that it will prompt you to update/verify the data connection credentials if you send or download the pbix file directly and use it on another device or display the error message for any valid credentials to obtain and connect to the database.
Note: You are working in the direct query mode that will send the query each time you interact with visuals or load data. The import mode data source, allows you to make some report layout changes to the pbix file if it does not operate on the backend query tables.
I hope this will help you know more about your scenario.