For me, only these steps could help me setting the root password on version 8.0.19:
mysql
SELECT user,authentication_string FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_pass_here';
FLUSH PRIVILEGES;
SELECT user,authentication_string FROM mysql.user;
If you can see changes for the root user, then it works. Source: https://www.digitalocean.com/community/questions/can-t-set-root-password-mysql-server