I built something that took me 2 hours and then I tried to paste it, but it said "Can't access blocks out of the world. Same thing when I was using /fill and it said "Can't place blocks out of the world" I checked the coordinates 5 times and it still said that.
If you are doing this on a local world you can try increasing your simulation distance or setting a ticking area.