7 Do not associate with these nations that remain among you; do not invoke the names of their gods or swear by them. You must not serve them or bow down to them.

Read Joshua 23:7 Using Other Translations

That ye come not among these nations, these that remain among you; neither make mention of the name of their gods, nor cause to swear by them, neither serve them, nor bow yourselves unto them:
that you may not mix with these nations remaining among you or make mention of the names of their gods or swear by them or serve them or bow down to them,
Make sure you do not associate with the other people still remaining in the land. Do not even mention the names of their gods, much less swear by them or serve them or worship them.