When getting a second vaccination, you will probably get the most bang for your buck against the specific protein target(s) contained in the first vaccine if you get a second shot from the same manufacturer.
However, especially as the Delta variant is somewhat different than the specific gene sequence/protein that the initial vaccines targeted, it might be a good idea to switch to a different vaccine for the booster.
This is a guess on my part. I haven’t read any studies about it yet.
In addition, I don’t know the exact difference between the Moderna and Pfizer vaccines.