I think you should delete these lines from your library file.
js-cookie:
js:
libraries/asset-packagist/js-cookie/dist/js.cookie.min.mjs: {}
dependencies:
- core/jquery
- core/drupalSettings
You try need to replace the used library core/jquery.cookie to core/js-cookie.
my_module.libraries.yml
my_library:
js:
js/my_library.js: {}
dependencies:
- core/drupal
- core/js-cookie
- core/drupalSettings
- core/jquery
js/my_library.es6.js
(($, Drupal, drupalSettings, CKEDITOR, cookies) => {
Drupal.behaviors.myModule = {
attach: () => {
// Set a cookie.
cookies.set('cutest', 'red panda');
// Retrieve a cookie.
const cutest = cookies.get('cutest');
// Remove a cookie.
cookies.remove('cutest');
// Store and retrieve as a JSON object. Use of the getJSON method should be avoided as that will be deprecated in js-cookie 3.0.0.
cookies.set('cutest', JSON.stringify({ animal: 'red panda' }));
const cutest = JSON.parse(cookies.get('cutest'));
},
};
})(jQuery,Drupal, drupalSettings, CKEDITOR,window.Cookies));
Here is the official documentation with an anchor to the part that explain how to use js-cookie: https://www.drupal.org/node/3104677