How to create pixel perfect Icons in XD?

Hello,
I'm struggling to create icons that scale up without losing their properties or looking different from the size it was created. I'd appreciate some help. TIA.
1. Should the icons be designed at the smallest size? if so, what should be the dimensions?
2. While creating outlined stroke icons, does it matter how the stroke is aligned (out, in, or centered)? Should the stroke be converted into fill before exporting to avoid losing the properties while scaling up?
3. Should I create icons in Ai to avoid pixelation or in digital design apps like XD, sketch, or Figma?
4. To get pixel-perfect icons, does each shape that makes up the icon need to be a whole number, or the shape created after the boolean operation should be a whole number?
5. Lastly, when creating a family of icons, do all the icons have to be the same stroke weight?
<Title renamed by moderator>
