You cannot change the portlet type in Microsoft SharePoint Online 2019. You must remove the unwanted Web Part and replace it with the appropriate one.
For more information on removing the unwanted Web Part, see Deleting an Existing Portlet.
For more information on placing the new, appropriate Web Part, see Adding Portlets to a Page.