Don’t know if you have access to a sewing machine, but this shows how carpet edge binding is normally done.
https://m.youtube.com/watch?v=vbPLrzq9NMM
One thing I do that they didn’t show is after the first stitching on top is done, I flip it over and use a little 3M super 90 to hold the vinyl / leather to the back of the carpet so it’s not shifting around and good and tight when the second row of stitching goes in. I’ve also considered welding up angle iron to fit the top of the step that will hold the carpet in place. Could be powder coated or vinyl wrapped.