How to extend content type of a plugin from within another plugin?

System Information
  • Strapi Version: 4.x.x
  • Operating System: Linux
  • Database: Postgres
  • Node Version: 20.x.x
  • NPM Version: 10.2.x
  • Yarn Version: 1.22.x

Can this be done from within a plugin? I am trying to extend the user content-type from within another custom plugin and trying to load the collectionType from strapi-server.js in the plugin folder. However, it shows collectionType can’t be duplicate and throw error.