Vayikra20:7

וְהִתְקַדִּשְׁתֶּם וִהְיִיתֶם קְדֹשִׁים כִּי אֲנִי יְהוָה אֱלֹהֵיכֶם׃

Sanctify yourselves and be holy, for I am the Eternal your Almighty.

Vayikra 20:7

וְהִתְקַדִּשְׁתֶּם וִהְיִיתֶם קְדֹשִׁים

Vayikra / Leviticus 20:7 · Pshat

Vayikra 20:7

וְהִתְקַדִּשְׁתֶּם וִהְיִיתֶם קְדֹשִׁים כִּי אֲנִי יְהוָה אֱלֹהֵיכֶם׃

Sanctify yourselves and be holy, for I am the Eternal your Almighty.

Pshat פְּשָׁט

Sanctify yourselves

Sometimes a person gives up what harms him, and only then sees how he has changed. Where does holiness begin?

Rashi: "sanctify yourselves" means: keep apart from the idol worship spoken of above. Sforno: keep apart from forbidden intimacy. Ibn Ezra: it is repeated to include the strangers living among the people: they too must be holy, for they live in a holy land.

How Rashi, Ibn Ezra, and Sforno explain it

Rashi Sanctify yourselves

This is keeping apart from idol worship.

Ibn Ezra Sanctify yourselves, for I am the Eternal your Almighty

Holy, and I gave you statutes so that you keep them and be sanctified. Scripture has already mentioned this, and the meaning here is to include the resident strangers (גֵּרִים תּוֹשָׁבִים) living with Israel: they too must be holy, because they live in a holy land.

Sforno Sanctify yourselves

By keeping apart from forbidden intimacy.

Takeaway

Before this verse the Torah speaks of the worship of Molech and of those who call up the dead (Vayikra / Leviticus 20:1–6).
A resident stranger (גֵּר תּוֹשָׁב) is a non-Jew who lives among the people and has taken on the seven commandments of the descendants of Noah (Avodah Zarah 64b).