This article suits well your case :
Create global parameters for server name, database name, Username, and Password. It is recommended to encode the credential information in base64 format to prevent misuse. Global parameters can be passed when referencing the linked service in the dataset or pipeline.
Create parameters for server name, database name, username, and password in the linked service parameter section.
Select the server name parameter for the server name field and choose the appropriate parameters for the other fields.
For the password, it is possible to store it in Azure Key Vault and retrieve it by specifying the secret name.
The connection details have now been parameterized. Use the test connection feature to verify the success of the connection. Pass the parameters and click on test connection.
More links :
https://learn.microsoft.com/en-us/azure/data-factory/parameterize-linked-services?tabs=data-factory