I created a project using Content Entity but now I need to change this entity to Config Entity. Do you know how I can do this?
Agreed with @anonymous: the structure and purpose of config entities is very different from content entities. Start with a clean config entity and only then see if you can reuse some of your existing code, most likely in the form functions, twig templating and ancillary CSS and JS files.
And if you're starting from scratch, definitely try Drupal Console if you haven't already. It will generate spotless boilerplate code specifically for a config entity: