If I shoot in H.264 is it worth it to export the product in ProRes?
The 2 formats have different uses. H.264 is mainly good as a playback format. It's supported widely, compresses very well, and can be decompressed by relatively low-powered devices easily. It's also supported in some video cards making it hardware accelerated on those devices. While it is possible to edit with H.264, it's not ideal as it's a Long-GOP format. GOP here is an acronym for "Group of Pictures". Typically, Long-GOP formats contain 1 keyframe followed by several frames that are differences from the keyframes every so many seconds. So if you want to cut on a frame other than a keyframe, you need to decode the keyframe and all frames from the keyframe up to the frame you want to cut on, making it slower to edit.

ProRes, on the other hand, is intended to ensure the fidelity of the frame through numerous edits. While its compression is good, it focuses more on quality so the amount of compression is less than that of H.264. (In fact, in ProRes 4:4:4(:4) you can have lossless compression with ProRes.) Many devices will not playback ProRes because there's no codec written for them. I think that it's also a higher bit-depth than H.264. (There are higher bit-depth versions of H.264, but I don't know how widely supported they are.) It's also an intra-frame compression scheme, meaning that you don't need any previous frames to decode a given frame. That makes the compression less, but makes it easier to decode any given frame.

So ProRes is better for editing because it preserves fidelity, is faster to decode frames, and offers higher bit depths (or at least offers them more consistently). H.264 is better for playback because it's supported on more devices, and the compression ratio is higher.

You can think of it similarly to audio sample rates. For playback, nothing over 44.1 kHz can make any audible difference to humans (despite what marketing may tell you). But for the purposes of editing, working at 96 kHz can be useful for preserving fidelity through the addition of effects, various mix downs, and mastering.