The first citation:
וְיָדַעְתָּ֣ הַיּ֗וֹם וַהֲשֵׁבֹתָ֮ אֶל־לְבָבֶךָ֒ כִּ֤י יְהוָה֙ ה֣וּא הָֽאֱלֹהִ֔ים בַּשָּׁמַ֣יִם מִמַּ֔עַל וְעַל־הָאָ֖רֶץ מִתָּ֑חַת אֵ֖ין עֽוֹד׃
You will know today and will cause it to rest in a fixed fashion upon both your Yetzer HaTov and your Yetzer HaRah (that like in the Shema, לבבך refers to the two natures in every person) that G-d (the Holy One, blessed be He, who transcends all things) is the G-d of nature (that אלהים shares the same gematria as הטבע, nature like is found in Be'er HaGolah of the Maharal, HaBe'er HaShevi'i, beginning with the words: וכן גילה לנו רבינו הקדוש הגאון האלקי מוהר"ר דוב בער) in the Heavens above and on the earth below; there is no other.
is addressing the concept of G-d's unity. This is part of our belief according to the Torah.
The second citation:
כִּ֚י יְהוָ֣ה אֱלֹֽהֵיכֶ֔ם ה֚וּא אֱלֹהֵ֣י הָֽאֱלֹהִ֔ים וַאֲדֹנֵ֖י הָאֲדֹנִ֑ים הָאֵ֨ל הַגָּדֹ֤ל הַגִּבֹּר֙ וְהַנּוֹרָ֔א אֲשֶׁר֙ לֹא־יִשָּׂ֣א פָנִ֔ים וְלֹ֥א יִקַּ֖ח שֹֽׁחַד׃
Because HaShem (the Holy One, blessed be He, who transcends everything), your G-d, is G-d of the judges (in this case האלהים is referring to the judges like in the Targum Onkelos) and L-rd of the Kings (again, like the Targum), the G-d of kindness, severity and justice, who does not distort judgement through favoritism, nor through taking bribes.
is explaining how we are to try to emulate G-d when we serve Him. Like is prefaced in Devarim 10:12, this is explaining how we are to walk in His ways.
The two citations are not dealing with the same type of subject.