We need to understand the difference between modernisation and westernisation. We often confuses these two things as one because its the western world which is modernising us, but they are not the same.
Modernisation is advancements in different aspects of our lives. This involves things like advancements in technology, science, medicine, architecture, communication and overall improving living standards. There is nothing wrong in adopting such brilliant inventions and Islam do not restricts us from doing this.
On the other hand Westernisation means adopting the customs, culture, norms and values, morality, and constitution of the people living in the western part of the world. This is something prohibited by Islam and in broader term not good practise for any civilisation, to copy another, as it loses its own uniqueness.
We should absorb good from anywhere in the world, west including, but flaws of their culture should not come with it. We should embrace their technology to keep up with the fast moving world but should reject their indecent societal values. We should allow our children to get western education but forbid their disrespectful attitudes.
We need to analyse what elements exactly helped western world to achieve such great advancements in all aspects of the world and only adopt those elements rather than just blindly following everything they do. Our example is like of that kid who by wearing superman clothes think he has become superman. By dressing like western people or adopting their way of life will not make us modern or advanced, rather by doing so we only disrespect out unique identity.
On other extreme, we should not simply reject anything only because it is introduced by west. We should not straightforwardly disregard western inventions without evaluating its costs and benefits. We need technical people who can analyse western inventions and decide if their use will be beneficial for the society or not. Muslim clergy has made this mistake in the past which cost us heavily. Upon the invention of printing press, a fatwa was given which made its use unlawful and printing press was banned in Muslim world for around 400 years. This delay in adoption of printing press was unforgivable and hence renaissance in Muslim world never took place. This was also a point where Muslims lost their status as superpowers to European world.