For development systems, it's fine to make use of basic authentication; however, in a live environment, it should not be used. Instead, you should use Azure Active Directory (AAD) authentication.
You can find information on how to set up AAD on Microsoft Docs at https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-develop-connect-apps#setting-up-azure-active-directory-(aad)-based-authentication.