Nvidia driver not updating

I am trying to update my Nvidia driver through pacman which shows the following error

Preparing…
Cloning nvidia-340xx build files…
Checking nvidia-340xx-dkms dependencies…
Synchronizing package databases…
Warning: conky-lua-nv: local (1.12.1-2) is newer than community (1.11.5-2)
Resolving dependencies…
Checking inter-conflicts…

Building nvidia-340xx…
/var/tmp/pamac-build-himanshus/nvidia-340xx/PKGBUILD: line 37: /usr/src/linux/version: No such file or directory
==> Making package: nvidia-340xx 340.108-18 (Thursday 22 April 2021 06:14:20 PM)
==> Checking runtime dependencies…
==> Checking buildtime dependencies…
==> Retrieving sources…
→ Found NVIDIA-Linux-x86_64-340.108-no-compat32.run
→ Found 20-nvidia.conf
→ Found 0001-kernel-5.7.patch
→ Found 0002-kernel-5.8.patch
→ Found 0003-kernel-5.9.patch
→ Found 0004-kernel-5.10.patch
→ Found 0005-kernel-5.11.patch
==> Validating source files with b2sums…
NVIDIA-Linux-x86_64-340.108-no-compat32.run … Passed
20-nvidia.conf … Passed
0001-kernel-5.7.patch … Passed
0002-kernel-5.8.patch … Passed
0003-kernel-5.9.patch … Passed
0004-kernel-5.10.patch … Passed
0005-kernel-5.11.patch … Passed
==> Removing existing $srcdir/ directory…
==> Extracting sources…
==> Starting prepare()…
Creating directory NVIDIA-Linux-x86_64-340.108-no-compat32
Verifying archive integrity… OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.108…
Applying patch 0001-kernel-5.7.patch…
patching file kernel/Makefile
patching file kernel/conftest.sh
patching file kernel/dkms.conf
patching file kernel/nv-drm.c
patching file kernel/nv-linux.h
patching file kernel/nv-procfs.c
patching file kernel/nv-time.h
patching file kernel/nv.c
patching file kernel/os-interface.c
patching file kernel/uvm/Makefile
patching file kernel/uvm/conftest.sh
patching file kernel/uvm/nvidia_uvm_lite.c
Applying patch 0002-kernel-5.8.patch…
patching file kernel/nv-linux.h
patching file kernel/nvidia-modules-common.mk
patching file kernel/os-mlock.c
patching file kernel/uvm/nvidia_uvm_lite_api.c
Applying patch 0003-kernel-5.9.patch…
patching file kernel/nv-drm.c
patching file kernel/nv-linux.h
patching file kernel/nv.c
patching file kernel/uvm/nvidia_uvm_linux.h
Applying patch 0004-kernel-5.10.patch…
patching file kernel/nv-drm.c
Hunk #1 succeeded at 364 (offset 42 lines).
Applying patch 0005-kernel-5.11.patch…
patching file kernel/nv-linux.h
patching file kernel/uvm/nvidia_uvm_linux.h
==> Removing existing $pkgdir/ directory…
==> Starting build()…
NVIDIA: calling KBUILD…
make[1]: *** /usr/src/linux: No such file or directory. Stop.
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:202: nvidia.ko] Error 1
==> ERROR: A failure occurred in build().
Aborting…

How can I update it?

You will not be able to install that AUR package due to differences between Arch and Manjaro. See here.