Firstly kudos, that you're able to spend time and learn Devops and cloud.
Secondly it all depends on where you see yourself in the coming years and also weigh in the market opportunities.
Most developer jobs are going to be sacked because of AI(personal opinion). BUT, Hey if you're doing great and something unique you'll be around in the industry for a longer time.
My opinion would be, focus on getting into good company regardless of the role and then understand what could really work for you.
Devops is definitely gonna be around for the next 5-10 years, later there might be a ton of automation(already on its way) for getting these Devops related tasks.
Finally whatever you're learning try to be the best at it.
Happy learning.