If done well, the optics are that you have a strong upwards trajectory as a leader and are well respected by your teams and executive leadership. From here, it's fairly easy to continue to move upwards toward an upper management role.
If done poorly, the optics are that you are an empire builder and not capable of actually moving the company forward, or supporting your people effectively. You will be not be respected and many people, including your own reports, will talk behind your back end eventually you will be pushed out.
Another path up requires a patron or sponsor. This might be your direct boss who moves up and takes you with them.
The last option is waiting for your boss to quit and be given the opportunity to take their job by your boss's boss. The best bosses will groom you for this.
If advancing your career is your ambition, then you might need to side-shuffle into a role where you do more management and direct others to perform the roles that you current perform from time to time.
I recommend The Manager's Path by Camille Fournier. It takes you all the way from individual contributor to CTO. https://www.amazon.com/Managers-Path-Leaders-Navigating-Grow...
I have found the book "The Manager's Path: A Guide for Tech Leaders Navigating Growth and Change" by Camille Fournier thought provoking for me.