Adding autoincrement field with prefix

I just want to know on how to add prefix to my custom autoincrement field.
I tried to use the solution here however it is not indicated on how to add prefix

There also an alternative solution with a before_save hook here:

There you have an example of a complex generation of the number with several levels of prefix, you can adjust to your needs (if you are a developer…).