What shermann type? Compared to what P4 type?
Because, if you compare an easy 8 with a panzer 4 ausf D for instance, of course it is superior.
I'll try to summarize to keep my sanity, firstly Shermans had better life on tracks, better traverse turret, the utility to use it's main gun as an artillery piece.
Comparing variants for either side is kind of pointless in that There were many many variants for both platforms, which include anything you can think of, massively armored shermans(that of which p4 could not viably penetrate in theory), flamethrower shermans, rocket arty shermans etc..so I will be general.
Aside from that Shermans were more reliable, multiple different engines allowed for both diesel and gasoline. has better overall armor and shermans had a sloped frontal hull which proved effective, accounting for HVAP rounds in the Sherman also makes comparison a no contest the Sherman has every advantage to shoot first and harder.
There is more but I cant be bothered, p4 was slightly inferior in almost every way. Which Is why US thought it would be ideal to mass produce shermans.