Spain winger Nico Williams is set to miss the rest of the season with a moderate hamstring injury but should be ready for the World Cup.