There is absolutely no need to change it from the system defaults which will automatically manage the page file size for you. The same applies to Windows 11.
^^^This^^^
Just leave the defaults alone. For 99.9% of us, Windows knows how to properly and efficiently manage system resources just fine using the default settings.
To answer your other questions, for Windows, the term is Page File. "Swap file" is a term from ancient computer history but still commonly used. And Windows still has uses a swapfile.sys, pagefile.sys and hiberfil.sys files to manage our "virtual memory" (system memory plus temporary disk memory).
One common misconception is that the page file is used as "overflow" space when it runs out of System RAM. That is incorrect. Windows will use the page file even if there is massive amounts of RAM installed. It uses the page file to temporarily store (cache)
lower priority data, leaving the high priority data in faster RAM. That's a good thing as it (the lower priority data) is temporarily stored in the page file as "raw", but immediately usable, data - as compared to being a "saved" then "closed" file that then needs to be "read" and "opened" and temporarily stored as raw data again, next time it is needed.
A common problem, even among most enthusiasts who love to "dink" with the page file, is the page file size is NOT a "set and forget" setting. The old and obsolete rule of thumb you might have heard of 1.5 times the amount of system RAM for the page file size is just that, "old and
obsolete". The optimal page file size is determined my many factors, including commit rates, RAM/hardware and the software running. These are all variables that... well... vary!
Most users have no clue what commit rates are. And that's okay. Windows does. And since those variables vary, Microsoft made the page file size "dynamic". That is, it will change as needed - AS LONG AS the user does not dink with the default settings! So leave them alone! The default setting allowing Windows to automatically manage virtual memory and the page file size is the ideal setting.
My question: I don't see an obvious way to do this in Windows 10, so is this even necessary in Win 10, and if so, how do I do it? How about Windows 11?
It is not obvious because, sadly, most users, even very experienced users are NOT true experts at memory management. Windows 10 and Windows 11 are NOT XP and should not be treated like XP. Unfortunately, too many times, because "
I've always done it that way", users have dinked with the settings and then if (when!) things go wrong, they blame Microsoft. So Microsoft would rather make the settings hard to find, than get blamed for performance problems they did not cause.
So, why do you feel you need to make changes? Are you getting out of memory errors? How much RAM do you have installed? How much "free" disk space do you have on your boot drive? Is your Windows fully updated?