It's quite simple, make the column numeric.
Use text for descriptive columns, even if you have only numeric digits in it. And use numeric columns when you need to do accounts like this.
It's even possible to do it this way, but it's so more complicated that the ideal is to change the column. Do not work with misconceptions that the problem is getting bigger.
If you enter, you will need to first convert the column to numeric, make the count by adding 1 and then converting it back to text.
UPDATE produto SET codigo = to_char(to_number(codigo, '999999') + 1);
But this can vary according to your need.
Understand the difference between what is the given, what is the column, the syntax, what does each thing in the code. Without understanding what each thing does in your code will not be able to program. And this is the easy part of programming. You have no idea the hard part. And how easy it is to do everything wrong and work and think you are getting some results, when you are causing huge problems.