To set the different payment methods for different shipping in shopware 5 follow the steps:
Step 1: Login to the admin panel and go to Configuration>Shipping Costs.
Step 2: Click on the Add to add the Shipping costs management.
Step 3: Fill the options of the Shipping costs.
Note: Click on the Active to activate the Shipping methods.
Step 4: Double click under the Shipping costs to add the costs of shipping.
Step 5: Click on the Payment methods.
Step 6: Drag and drop the payment methods which you want to allow on the shipping costs.
Step 7: Click on the Save button to save all the process.
Step 8: Now go to Store-Front and click on any product.
Step 9: Click on the Add to shopping cart.
Step 10: Click on the Edit shopping cart.
Step 11: Click on the Shipping costs and select the Payment method and Shipping method which you want to add.