Do you know the Arch wiki? It has all the answers for basic questions like this. The pacman page has a specific section about “Skip package from being upgraded”:
I know this may be an example for a general question, but in this specific case if you don’t want the latest kernel then using linux-lts is the better choice than holding back a kernel update.
As an option to hanging onto the previous release for a while, linux-lqx only switches to a new series after a few point-releases.
UPGRADE OPTIONS (APPLY TO -S AND -U)
-w, --downloadonly
Retrieve all packages from the server, but do not install/upgrade anything.
--asdeps
Install packages non-explicitly; in other words, fake their install reason to be
installed as a dependency. This is useful for makepkg and other build-from-source
tools that need to install dependencies before building the package.
--asexplicit
Install packages explicitly; in other words, fake their install reason to be
explicitly installed. This is useful if you want to mark a dependency as explicitly
installed so it will not be removed by the --recursive remove operation.
--ignore <package>
Directs pacman to ignore upgrades of package even if there is one available. Multiple
packages can be specified by separating them with a comma.
--ignoregroup <group>
Directs pacman to ignore upgrades of all packages in group, even if there is one
available. Multiple groups can be specified by separating them with a comma.
For an additional method, when using yay to upgrade your system, the list of packages is followed by:
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
You can just include the numbers of the packages you don’t want to update. This way, you don’t have to remember to update your ignorepkg line later.
That being said, instead of holding the kernel back, why not temporarily switch to the LTS kernel? That way you continue to get critical security and bug fixes.