Since commit ed6cddd98e32263fc116a4380af6d66da20da990 (PR #25717) incoming BLOCK messages have to pass an anti-DoS check in order to be accepted. Passing this check is currently only possible if there's a previous block available, which is obviously not the case for the genesis block, so it is denied:
ERROR: ProcessNewBlock: AcceptBlock FAILED (too-little-chainwork)
Fix that by adding the special case for the genesis block, so fetching it via getblockfrompeer on pruned nodes (which was possible pre v24.0) is working again. Inspiration for looking into this was the following twitter post: https://twitter.com/colemaktypo/status/1686423428155297796 as I vaguely remembered that this was possible in the past. The practical relevance of all this is of course debatable; on the long-term it might make more sense to put an exception on the getblock RPC to return the genesis block directly as embedded in the code, rather than trying to read it from disk, so fetching it from other peers is not needed in the first place (if we care about having it available on pruned nodes at all).