Notice of error on website front end

My site appeared the following notice:

Notice: WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.) in /home/customer/public_html/wp-includes/functions.php on line 5313

I have been trying to fix but it seemed not to succeed. Who have experience about this error pls help. Thanks.