I beleive the cap should be vented. If it's building up pressure, the vent is not working.
The vented cap only works one way. It lets air in to replace used fuel but does not allow fumes out.
What happened is very common. The fuel came from underground tanks and is a lot cooler than the surface temperature. It is going to expand as it warms. Nothing to be concerned about. Just learn not to fill up right before parking.