you have a lot of pinching going on - which is impossible to remove unless you do some correction shapes that are driven (or a few other ways)
they are all a little bit complicated for a beginner
so what I would focus on now is the weight painting and the rig
the first thing to fix is to make the upper leg and the lower leg join at the joint - this is good practice
then you will see need to overlap the verts that should be influenced by both bones
if they are just in 1 vert group - they will move 100% and not look natural
you need to add them to both groups and then play with the weights
try to use “bone heat” when you parent the armature to the mesh - and always make the modifier real
the bone heat is a good staring point for you to start editing
it is also necessary to understand how the weighting works before you start painting weights
so let’s imagine you have 1 vert being pulled by 2 bones
if both groups are set to 100% - it will be pulled 50% by each (because it cannot be influenced more than 100%)
so keep this is mind - the color weighting doesn’t always show you the true influence
if it is 90% in one group it will need to be 10% in the other to show you the correct weights
I’m pretty sure it works as a ratio where the total value must equal 100%- so if one group was 80% and the other 40%
it actually would be 66.666% and 33.333%
(I am also happy to be corrected on this)
there are a few scripts that will normalise the weights which are quite handy (normalise means change the weights so the colors are correct - this would change the 80%-40% example to 66% and 33%)
This is quite a bit to take in all at once so I would start with the bone heat (it really is very good at doing it automatically to start with)