#JavaScript (ES6), 67 bytes
Takes input in currying syntax (c)(s)
. 1-indexed.
c=>s=>[...Array(c)].map((_,y,a)=>a.map((_,x)=>(x=x>y?x:y)<s?x+1:0))
[Try it online!][TIO-jjsm6j7r]
[TIOTry it online!
If we were allowed to output a 1-jjsm6j7r]: https://tio.run/##NYxNCsIwFAb3PUV2eR/WoOiqmBTPoSKP2EpLm5REJDl9/EF3M4uZkZ8cbRiWx9r5W1d6Xaw2UZuTUuoYAmeyuKiZF6JrnWuGNvzX9BZKOpncpibjENu02jYboFjvop86Nfk7VUL0tAft8O34Mxj94EgKCfzw7CQqlBc "JavaScriptdimensional array of (Node.js) – Try It Online"\$C^2\$ values instead, then this 62-byte recursive function would be more competitive:
c=>s=>(g=y=>y<c?[(x=k%c>y?k%c:y)<s?-~x:0,...g(++k/c)]:[])(k=0)
Try it online!