I used to have that uncertainty (was in Auger as a PhD student, so a similar field), but assuming it's something you think you might enjoy doing, going from writing analysis software in astrophysics to doing that as a primary profession is not
very hard. It does likely come with a reset of expectations, going back to primarily learning instead of teaching for a little while.
Happy to expand on my experience if that would be helpful.