Compiler can't find some C headers

I’ve decided to get my hands dirty and try messing around and create a driver for a device. However, the very first problem I run into is that gcc fails to find the following headers:

#include <linux/init.h>
#include <asm/irq.h>
#include <asm/io.h>

Simply copying and pasting the code from the kernel doc’s “Creating an input driver” (can’t put the link, probably account limiation) immediately gave me a compile error: fatal error: linux/init.h: No such file or directory
I’ve confirmed that the problem is specifically with finding the headers, as a simple hello world fails to compile and, if I comment or exclude those headers, the compiler works. For the sake of comparison, the headers <linux/input.h> <linux/module.h> don’t generate a compile error.

sudo pacman -Syu shows that everything is up to date.
I have linux59-headers and linux-api-headers installed and the result of uname -r is 5.9.16-1-MANJARO
How can I make the compiler find the headers?

have you added base-dev ?

you should go to linux 5.10 & 5.11
and may be add 5.4

5.9 is end of life

How do I do that? Simply download the newer kernels? Also, what’s the proper name of that base-dev package? I can find a “base” package from the core repo, but it isn’t installed, is that it?