I see that systemd-resolved listens on port 53 and sends all the DNS requests to the real DNS resolvers.
systemd-resolvd is a "real" resolver (just as real as any other recursive resolver): it needs to the resolvers responsible for some zones about answers; that's how DNS works
Catch the response from the DNS resolver that is about to go into the systemd-resolved at port 53
Nope, that's not how that works: DNS requests will come from a randomized port, going to port 53 at the remote resolver, which will then answer on the same port the request was made from.
53 is the destination port, not the source port for the request. For the reply, the source port (on the remote DNS server) is 53 and the destination port (on your machine) is the same as the random source port number chosen by the requester.
Hold this packet, read its content (see the actual IP address response), do something with this IP
You would usually just implement that by having a resolver that you configure your resolver to use. You already have systemd-resolved, which is pretty much that, so the question here becomes what you're doing this for, and whether there isn't functionality that already is in your system, which can fulfill that purpose.
Is this something that can be achieved with iptables, libpcap or any other available solution?
Sure, you could implement the minimal amount of request/reply tracking in eBPF and let this run on the kernel side. Then you'd invent some way to do whatever you mean with "do something with this IP" in the kernel, or a protocol for your kernel side to exchange that information with a userland process that knows how to do that.
But that's just really putting the job of a resolver proxy userland program in the kernel, and it sounds like a lot more work and much more intrusive than just making systemd-resolved do what you want, either by itself, or by configuring it to use your own resolver implementation.
looking for a transparent solution
DNS is by design recursive anyways. Adding one more level is nothing special, and thus "transparent" to any program using DNS.