What value does self-learning a course (or several) have in graduate admissions? I am an undergraduate student who hopes to switch my major from engineering to Physics. Although this switch is possible, I lack several crucial foundation courses in Physics such as electrodynamics and quantum mechanics in my transcript and I hope to offset this by self-studying, either by:

Going through a textbook, make notes for each chapter and attempt some of the exercises at the end of each chapter.

Or, go through the MIT OCW courses and attempt the problem sets, projects, exams etc.


(I am personally leaning towards the latter as it feels more organized and less overwhelming).
But whichever path I take, I hope to type up all my notes and solutions on LaTeX and post it publicly (mostly a GitHub repo). I realise that doing this is not even remotely as rigorous as actually taking the course at university and being graded for it, but I would like to try.
My question is, how do graduate admissions committees and potential supervisors view self-studying of this sort? Does it carry any importance?
Note: I hope to apply to graduate schools in USA/Canada/Germany. My research experiences are all in Physics. This question is pretty similar to mine, but this question is for a specific CS course, and I would like a more generalized answer.
Does it carry any importance? (to admissions)

Little to none.  Anyone can claim to have studied something independently.  If you want to increase your chances of admissions, you need to provide evidence that the admissions committee can easily check.  Your repository does not count.
You should, however, do sufficient self study that you are able to succeed in graduate school.  You may be required to complete graduate courses and to take qualifying exams; do start preparing for those things if they are applicable.
Successful research experience is more important; the purpose of a PhD is to do research.  If you have already done it, that is very convincing to an admissions committee.