First of all, you can make money by contracting code and writing programs for outside companies on a part-time basis. Generally, these companies may not need many such services, so they don't hire a programmer specifically. However, in order to attract people to do this extra work for them as soon as possible, they will pay more than ordinary companies, so you can outsource more such services, and the money you earn in one month may be almost the same as your salary.
There is also to record your professional knowledge as a video, show it in the form of lectures, and put it on a special class website for sale. In fact, you don't need to show too many high-quality videos to get a lot of income, because one class can be sold to people who need it, so you can shoot some videos of your professional knowledge on a regular basis and sell them online. If you are very good at videos and have a serious attitude, you can also accumulate some fixed ones. Your part-time job will become very stable when the time comes.
and you can work as a technical director of the company to earn money part-time. Some companies are mentioned above, and they don't need programmers, but it is inevitable that they need such services in ordinary business. So they will go out and hire some part-time programmers. So you can do this kind of work.
Of course, even part-time jobs should be done very seriously. Only in this way will these companies hire you to serve them in the three places, and even after reaching a cooperation, the salary may be higher. And if your reputation in the industry is very good, it will be very good to introduce you then. But pay attention to whether your boss will mind doing part-time program guidance.