When you start the “mysql_secure_installation” and in the first step you get an error: “Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server“, then here is the answer for you.
first thing is to kill the current “mysql_secure_installation” task
sudo mysql ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'Choose-your-own-password'; exit
Then restart the “mysql_secure_installation” with the command
Login with the new password and complete the steps in the wizard.