Going from PhD to Prof though, is a difficult, unlikely path of awkward postings: for every 100 PhDs expect ~1 successful academic. Oh, and once you are a professor, expect a salary....less than that you'd get in a starting job straight out of your PhD.
Bluntly, if your goal is to become a professor, don't. With 99.99% certainty, you will not become a professor and the opportunity cost is extremely high.
Almost nobody with a PhD who dreams of being a professor ever actually gets to be. Most quit or only ever become adjuncts, and, in the US at least, adjuncts earn less than minimum wage and get zero respect from anyone. Most likely you will be abused by institution after institution who will keep telling you how important your dream is while stringing you along and paying you next to nothing. Or you will quit. Or you will have a mental breakdown.
If you can see yourself being happy doing literally anything else, do literally anything else. If you can't see yourself being happy doing literally anything else, spend some more time thinking about it.
If you're independently wealthy and don't really need to succeed at the goal to live a happy life of luxury, then definitely go for it.
I met one person at my Master's degree lab who went on to PhD, he said his childhood dream was to be a professor (and his father was a professor). I also have a father that is a professor (and have been very curious about PhD - although that window is getting narrower as I'm getting closer to 30:s) but he have multiple times told me that "it's not worth it", "it's a waste of time, the opportunity cost lost is too high", yet in my field I often see job post that requires a PhD, so I get mixed signals.