Google maps can be installed and used on grapheneOS even without installing any of the 3 google service components (google services framework, google services, google store). No google account is required either, as far as I know.
However if you install and use the app on a profile in GOS, google maps can see your IP and can fingerprint your device. If a google services component is also installed in that profile then google maps can become associated with those google services through various IDs. If other google apps are also installed they too can become associated together through IPC. This way your movement and search data in google maps can slowly become associated with your identity, and other google components installed.
If this is important to you and you want to be more anonymous then its better to install google maps in a different profile with no google components and have "always on VPN" enabled and use a VPN. This way you eliminate important elements of identity tracking.
Another option is to use google maps in browser only, (which prevents device fingerprinting and IPC) but this method is not as nice and fluid as the app.
Note that using a different profile doesn't prevent the google maps app from fingerprinting your device.