Difference between Script Editor and Content Editor Webpart
  1. Webpart usage:

    In Script Editor Web Part we can paste HTML , CSS and JavaScript only.
    In Content Editor webpart we can add HTML, CSS, JavaScript, formatted text, tables, hyperlinks, and images also.

  2. Content Link availability:

    In Content Editor webpart, we can give a link to the file uploaded in a document library.
    In Script editor webpart we do not have such option.

    Difference between Script Editor and Content Editor Webpart

    Advantage of having "Content Link" property in CEWP is that, we do not need to always edit the page for code modification. We can just edit the file linked to the CEWP. This helps in preventing accidental loss of code as we can restore the version of that file.

  3. Code reusability:

    As content editor webpart has a Content Link Property, we can reuse the same js,html,css, etc. files on multiple pages. If we make the code change, it will be visible on all the pages where the content editor is added with that file.
    In Script editor webpart, you need to manually update the code on all pages by editing the page.

  4. Export webpart option:

    Content Editor webparts can be exported while Script Editor cannot be exported by default. Script Editor webpart has default export mode of ‘Do Not Allow’.

    To allow exporting of Script Editor webpart, in the properties pane, expand the Advanced section. You will see that there is a field to set the Export Mode of the web part, change this to Export All. This will enable the Export command on the web part menu, which will allow you to save the web part locally to your desktop.

    Refer below article for detailed tutorial on how to export script editor webpart: How to create an exportable script editor web part in office 365
    Difference between Script Editor and Content Editor Webpart

  5. Migration issues:

    As content editor webpart uses a content link file, there will be no issues when we migrate the SharePoint site. 

    But as Script editor webpart contains the code in the page itself, there will be issues while migrating the pages to higher environments.