Hello there, and welcome!
GrapheneOS doesn't currently recommend anything below a 6th gen Pixel. You can find the project's recommended devices here:
https://grapheneos.org/faq#recommended-devices
The Pixel 4a is about to be end of life, so it is a particularly bad choice at this time.
You can find a table with the end of life dates of devices here:
https://grapheneos.org/faq#device-lifetime
Pixel 4a's end of life date is November 2023. At that point, the device will likely receive a very limited amount of harm reduction updates in the form of extended support releases, and then marked obsolete. Even for the duration in which it is receiving these harm reduction updates, the device is not secure, as it missing updates that no OS can provide after the vendor stops supporting it.
GrapheneOS can only fully provide security updates to a device provided that the OEM is releasing them. When an OEM is no longer providing security updates, GrapheneOS aims to provide harm reduction releases for devices which only have a minimum of 3 years support. Extended support updates at minimum will be done until the next Android version. It is likely that we will make a decision around harm reduction releases for other devices with longer lifetimes in Q4 2024. Harm reduction releases do not have complete security patches because it's not possible to provide full security updates for the device without OEM support and they are intended to buy users some limited time to migrate to a supported device.
If you can afford it, I would highly recommend getting a Pixel 6a, which can be found for relatively cheap depending on your country, especially if you buy it used (please make sure it can be OEM unlocked in that case, or you would be able to install an alternative OS on it).
The Pixel 6a is going to be receiving full security updates until July 2027, so it's by far the best bang for your buck at this time.
I hope this helps!