Answer:
The sentence "William has bought it last Sunday" is ungrammatical because "last Sunday" refers to the past and the verb tense used is "has bought" which is in present perfect and is used to talk about actions that started in the past and continue to the present. A correct version of this sentence would be "William bought it last Sunday"