If my instructions say
Cast on 12 sts, pm, k to end. Rep last row once more
I would cast on 12 stitches. Not at the end of what I have been doing, but just by themselves. Then place a marker and knit off my work that I had before. That’s why “to the end”
so, what you did, as I understand: you cast on from the end of your work to the right (seen from right side of the work) and worked the stitches back, placed a marker, worked off the old stitches. That is different.
Thankfully, though, that makes the “increase” on the same side as your pattern. And it is charming because you do not need to break the yarn. So: no bad way to do it. Just different.
Now you will have to pay attention to not lose your count. Your pattern expected you to have one row less than you worked.
to tell it graphic again, work seen from right side:
the pattern wants to take 12 newborn stitches, approach your work from the right and put them on the right side of what you had before.
you worked 12 stitches away from the right edge towards the left in your cast on, then knit them back to where they belong:
same shape, one more row.
Just pay attention to the row count and most likely it will be the same thing all over!