In OP's picture that's actually one of those bendy, "octopus" style phone tripods, with the legs bent around the handlebars to secure the phone.
Looks like you could get one on Amazon for about $7.50 (that was the cheapest one I saw that was Prime eligible, there are lots of different ones for sale), or I'm sure any Best Buy (or similar electronics store) would have them too.
Alternately there are actual phone bike mounts such as this one (again, just copied and pasted the cheapest one I saw in the first 5 seconds, best to do your own research) which would be less risky since they're actually designed to do that.