There are following below steps need to follow to remove Magento 2 core module, add following below code in composer.json & write name of modules you want to remove inside replace
"replace": {
"magento/module-marketplace": "*",
"magento/module-authorizenet": "*",
"magento/module-braintree": "*",
"magento/module-multishipping": "*",
}