I think you have it a little upside down, Waxit. For one thing, things don't "hang" on a foundation.
But if you substitute "depend" for "hang" as some versions do, then yes, all things depend on these two laws for their foundation.
Strong's translates this as "All the law and the prophets depend on these two commandments."
You do realise, don't you, that when laws are passed, the statutory law is usually not the be-all and end-all of it? There are many subsidiary regulations (in Commonwealth countries called Statutory Instruments (SIs), possibly different in other jurisdictions) But the SI regulations must adhere to the sense of the law itself. It's my view that all the Big Ten commandments, and all the following commandments, are just like that: Statutory Instruments, further defining what is meant by the foundational law(s) but not overriding them.
The foundation is just that: the foundation. The most important part. The building atop the foundation can be cleared away entirely, it's just overlay. But the foundation remains and can be built upon afresh.
The most important part of the foundation is the Cornerstone. Try checking out what a cornerstone is, architecturally. Here's a start:
https://www.newstudioarchitecture.com/newstudio-blog/architectural-cornerstones
Do you need even one "guess" at who (not what) the cornerstone is of the church? Who orients his church in a specific direction? And whose apostles and prophets also form part of the foundation? Here's a little clue, from Eph 2:20:
The apostles and prophets observed the sabbath, as did Jesus himself, in pre-crucifixion times. I'm not sure it would be true to say that they observed the sabbath in the same way afterwards; can you say that? The ones who remained in Jerusalem got rather legalistic (it's so easy to do that, isn't it? = do the actions without refining the heart and intent); maybe they continued to be sabbath-on-Saturday (as you say) observant; but all the apostles, helpers, converts, who helped spread the early message didn't seem to be sabbath-y on Saturday. They just met together regularly.