All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
You should be grateful to Allah for His Grace and you should ask Him to grant you security and pray for continuous well-being.
You should not wish to be afflicted as this is dispraised. You should know that Allah is All-Wise and He puts things in their proper positions and places. He afflicts for a wisdom and he guards from affliction for a wisdom as well.
Allah may afflict with happiness and ease and He may afflict with misfortune. Allah Says (what means): {And We test you with evil and with good as trial; and to Us you will be returned.} [Quran 21:35]
Hence, you should endeavor to be grateful for the blessings of Allah and ask Him to make it last for you. Do not wish to be afflicted, rather prepare yourself to be patient if any affliction befalls you.
Our limited minds are not able to realize the wisdom of Allah in all His Actions. Rather, we should submit ourselves to Him and to whatever He Predestines and Decrees.
For more benefit on wisdom behind affliction, please refer to Fataawa 2795, 2855, 276046 and 87624.
Allah Knows best.