O you who have believed, fear Allah and seek the means [of nearness] to Him and strive in His cause that you may succeed.
أخرج الطبري بسنده الحسن عن قتادة قوله: (وابتغوا إليه الوسيلة) أي: تقربوا إليه بطاعته والعمل بما يرضيه.
al-Tabari has narrated with an authentic chain from Qataadah that he said regarding the portion of this Verse which reads "and seek the means [of nearness] to Him" that it means: Near Him by means of obeying Him and doing deeds which please Him.
الصحيح المسبور من التفسير بالمأثور
Volume 2 Page 178