The Qur’an is a reminder and guidance for all eras. As for those verses that address the people of those times only, here’s how we apply them:
1- They always have a modern application. One application is to be respectful in the shrine of the Prophet (s) by his grave and show respect. Even it he passed away, his soul is present.
2- We take the spirit of the verse. For example, one should not raise his voice above the voice of any of the Imams or whoever represents the Prophet (s), or it could also mean that we should not insert our opinions when the Prophet (s) instructs us what to do.
3- Such verses show how patient the Prophet (s) was with his people (they did not behave well with him). This allows us to appreciate him more.