Is it best practice to paint bath walls before before installing vanity, tile and sink?
Paint first
You will have fewer things to mask/protect and fewer critical edges to deal with and less stuff getting in the way. If you have large areas that you know will never be exposed, you can skip them - or paint them generally (e.g., roller but not brush edges; or primer only) but not worry about getting it "perfect".