Are the railings painted? If so, 1x6 cpvc trim will work to make a post cap. The 1x6 can be routed on the edges and installed with a 1x4 placed/centered on top of that with the edges routed as well. this type of cap is a good look and sometimes pvc base cap can go upside down on the underside of the cap around the post itself.
If not painted then get a 5/4 by 6 composite deck tread and make the caps, the same principles apply, routed edges-etc...
pre made caps are an option also with copper and such, very nice