Now I am confused.
Don't worry, we could tell
You are not that far off though. It is just that some program is not entirely telling the truth or was assumed to have support for a particular version (which it hasn't).
If I want the “latest stable” version should I install “trunk”?
No. Trunk (aka main is unstable). Stable is (latest) released version.
When I go to https://www.lazarus-ide.org/ and look at the latest version, 4.0 is listed.
Correct. Lazarus 4.0 is the latest (stable) release.
So is the “stable” version in fpcupdeluxe not the right one?
Correct again.
FPCUPDeluxe was not updated after the release of Lazarus 4.0 and by default should actually install Lazarus 3.8 as (latest) stable. So while it tells stable it means latest stable as was present on release of FPCUpDeluxe version that is used.
Two possible solutions in your particular situation (that is if you want to stick with a stand-alone installation (which is the smart option btw) and not use a standard install method(s)):
1. fiddle with FPCUPDeluxe to actually install Lazarus 4.0 instead of stable.
2. build Lazarus from source (as more or less suggested by WooBean
1. means pressing startup+ in FPCUPDeluxe and adding the tag "lazarus_4_0" (without quotes), selecting trunk as installation and only after those changes press the install button from main window.
2. means checking out Lazarus 4.0 sources with git (or download them from gitlab) and follow instruction to build Lazarus manually (see also
wiki). Unfortunately you did not mention the platform so cannot link to specific instructions. Gist is listed
here for Linux (same instructions more or less apply for other OS')