Which is better for keeping data: primary partition or logical partition?

In terms of data security, whether you have all your data & OS on the same partition or you split a single drive into two partitions makes no difference whatsoever.

If the drive fails, or you get a nasty virus, or you just delete a file & don't notice for a couple of days, then your partitioning didn't improve your chances at all.

For data loss-prevention, your only security is to never keep only one copy of anything.
There's an adage...

"Any data not stored in at least three distinct locations ought to be considered temporary."

In short, that means at minimum you need one on-site backup & one off-site backup [in case the house burns down.] The on-site backup must at least be a different physical drive, if not a different physical machine.
You must periodically actually test you can recover from these backups - otherwise you wasted your time saving them.

Having all your eggs in one basket... it doesn't matter if you have two baskets, if you're carrying them both in the same hand.
Assuming data is 'safe' because it's on a different partition on the same physical drive, no matter how you format it, is 'all eggs in one basket'.
Drop one, you dropped the lot.


If you are using a Logical Partition in an Extended Partition, then you are using the old-fashioned MBR Partition Table which is limited to drives of 2TB or less. The current standard for Windows 10 is the GPT Partition Table which arrived alongside EFI and UEFI Booting. GPT has additional features which help protect your data better, transparantly. Microsoft has provided an article on conversion.

Therefore, storing your data on an MBR partitioned drive is less safe than a GPT partitioned drive, but Tetsujin's also very right, and I voted for his answer.