Lord Shiva was mentioned in vedas which was written by Vyasa sage, but he did not write Shiva purana.
Is there a reason for him to wtite Bhagavatha only and nothing about Lord Shiva?
Vyasa didn't composed Vedas, Vedas were already there he just segregated it into four parts in Dwapar Yuga. And every Vyasa does that in every Dwapar Yuga.
Svetaswatara Upanishad 6:18.:
“Seeking Liberation, I take refuge in the Lord (Rudra), the revealer of Self-Knowledge, who in the beginning created Brahma and delivered the Vedas to Him”.
Vishnu Purana 3.3.:
In every Dvāpara (or third) age, Viṣṇu, in the person of Vyāsa, in order to promote the good of mankind, divides the Veda, which is properly but one, into many portions: observing the limited perseverance, energy, and application of mortals, he makes the Veda fourfold, to adapt it to their capacities; and the bodily form which he assumes, in order to effect that classification, is known by the name of Veda-vyāsa.
Vyasa Composed all the 18 Maha Puranas himself before Composing Mahabharata.
Matsya Purana 53.70.:
The great sage Vyasa, after compiling the 18 Puranas, indulged in the composition of the story of Mahābhārata, in order to magnify their bulk, which was an addition to the Puranas, by another lakh of slokas. And in which he has condensed the sense of the Vedas.
Even Shiva Purana.
Shiva Purana 1.8-9.:
It is destructive of the great fear of the Python of Kāla (Death). O sage, it is the noble Śiva Purāṇa formerly narrated by Śiva Himself.
For the benefit of the people in the age of Kali, the sage Vyāsa has abridged it out of great respect for the sage Sanatkumāra on being instructed by him.
he wrote Bhagavata that too with the help of Lord Shiva son Vinayaka.
You are confusing Krishna Bhagwatam with Mahabharata see this answer.
Did Lord Shiva told him to worship Lord Vishnu instead of worshipping himself?
It depends on which Purana you are reading, like in Skanda Purana 4.2.95.:
Thereupon Viṣṇu came there secretly and spoke to Vyāsa: “O Vyāsa, a great offence has certainly been committed by you.
Even I am greatly afraid due to this offence of yours. There is only one Lord of the universe, and he is Viśveśa. There is no one else.
I am the discus-bearer, due to his favour. I am the Lord of Lakṣmī due to his power. It was by Śaṃbhu himself that the capacity to sustain the three worlds was granted to me.
Due to the devotion to him the greatest Aiśvarya (prosperity, lordship) was obtained by me as a boon from him. If you desire my welfare, eulogize Śaṃbhu.
Do not entertain a thought like this to eulogize me on any other occasion, O son of Parāśara.” On hearing this, Vyāsa expressed by means of gestures:
- Brahman alone is one. There are not many entities here. Hence Rudra is only one. There is none second to him. If there be anyone else anywhere, let him who has the capacity to do so, explain it to me.
I hope this clarifies all your queries and misconceptions. Prd..