When you get a computer with windows on it, you should reinstall windows to make sure it's clean. Then install linux. Ubuntu will offer to resize the windows partition but won't offer FDE (full disk encryption) with it. Using the first link, you can install linux beside windows with FDE. Doing that should keep your boot order and boot loader correct.
In doing that, I broke my windows partition and needed to reinstall windows after installing linux. This breaks the bootloader. Repair instructions are in the later links.
- https://www.mikekasberg.com/blog/2020/04/08/dual-boot-ubuntu-and-windows-with-encryption.html
- https://linux-blog.anracom.com/2018/11/08/cryptsetup-close-not-working-for-lvm-on-luks-device-busy/
- https://unix.stackexchange.com/questions/678131/mount-proc-mount-point-does-not-exist
- https://help.ubuntu.com/community/Boot-Repair
- https://unix.stackexchange.com/questions/405472/cannot-find-efi-directory-issue-with-grub-install