If you have these products configured in App Store connect, then they are automatically and always for sale in the Sandbox environment. And If you are side loading your application to your device it will be using the sandbox environment. Then when you are attempting to purchase, the payment sheet will indicate if it’s using the sandbox environment and it will require a Sandbox Apple ID that you can set up in App Store connect.
also you have the option to use TestFlight for distribution and testing, which is using sandbox but does not require a Sandbox Apple ID from App Store connect.