[...] it's really hard to achieve what you want to achieve on a software level. No matter what you try to do software-wise, any knowledgable user is going to be able to change the permissions on the files of your sd-card.
He clearly mentioned he wants to do it on a hardware-level, exactly 2 posts above yours:
I’m trying to do it hardware level [...]
OP, just to make sure:
Are you trying to protect it that the user on your system won't be able to 'accidentally' (or maliciously) write to your sd card ?
Or do you want to protect the sd card that way, that noone will ever be able to write onto that sd card again ?
Some SD cards do have a switch which basically is a flag that tells the system that this is in read-only mode.
However, the system decides itself if it follows this convention or not.
On a hardware level, there is nothing you can do to truly protect your sd card from being written onto.
You could use a write-blocker and always access this sd card via a write blocker.
In this case there won't be a possibility to write onto it. But taking the sd card out and plugging it into a linux will still allow to write onto it.
The correct approach fully depends on what you want to achieve.
May you explain what EXACTLY you want to achieve ?