I mean, yes and no. If you upgrade to Android 14 you get to keep your apps. But you won't be able to install any apps targeting Android 5.1 or older, they claim because malware often targets older API levels that have more access. I tend to believe that, Android 5.1 was released at the start of 2015 and a lot has changed since then. And people get texts with downloads of apks, and actually install them.
But I still believe you should be able to disable that protection if you want to (and do we know you can't, in developer settings?).