There is no encoder named h264. Using -codec:v h264/-c:v h264/-vcodec h264 is just an alias that points to which H.264 encoder is the default.
The default encoder depends on how your ffmpeg was configured, but for most users it will be libx264.
It is recommended to use the name of the specific H.264 encoder you want. This will avoid ambiguity, so you can be sure which encoder you're using. Especially if you are using the same command on different computers or different ffmpeg versions as the default H.264 encoder may be different. For example, use -c:v libx264 instead of -c:v h264.
You can see which encoder is the default with ffmpeg -h encoder=h264. This will list all available H.264 encoders supported by your ffmpeg. The default encoder is listed first.
Note that there is a specific decoder named h264. It is the built-in FFmpeg H.264 decoder. FFmpeg does not have a built-in H.264 encoder: it uses external libraries instead, such as libx264.