If it is in an incoming call, First it is to verify the signaling parameters of the granstream as if it has enabled to receive the caller ID of the public line. And know how the public sends it during the ringing, after the first ringing, etc.
Then verify if I create a trunk for each fxo port and forward to the vitalpbx.
I am not quite familiar with the Grandstream FXO Gateway in general, but in my experience, the FXO CID is managed on the PSTN side since it is an analogue line that doesn’t transmit data other than voice signaling. Now, if you are sure your PSTN allows you to send the CID information through FXO, there might be some configuration on the Grandstream FXO Gateway to Overwrite the CID for each FXO interface.
On the VitalPBX side of things to write or overwrite the CID you can do it on various locations:
External CID parameter on the Extension.
On the Outbound Route, you can place the CID you wish to Overwrite with and enable Overwrite CID.
And finally, on the Trunk you can do similarly as with the Outbound Route.
With any of these ways, VitalPBX will be sending the CID to the Trunk and that will be the CID that the Grandstream FXO Gateway will receive. Then, the Grandstream should respect the CID sent or have the configs to overwrite it.