Getting error after installation on RPi5

is it plugged into ethernet?

If so, it is probably dns.

Yes, it’s connected with ethernet.
can i connect with wifi?

No. What would that achieve? Your ISP s dns is likely blocking you.

Can i connect directly to my laptop without internet? I’m new in Raspberry Pi

Again no.

It needs to download the os from the internet.

Specifically from ghcr.io (part of GitHub)

It can’t. Probably because some ISP dns servers block GitHub. Set the dns servers in your router to 8.8.8.8 or 1.1.1.1 or 9.9.9.9. Then start the install again.