Let's say the amount invested on December 31, 2020 is 1 dollar (you can think of 1 million dollars if you prefer). This is the initial portfolio value.
The initial weights are [0.5 0.5] by your example. This means the dollar amounts invested are also [0.5 0.5].
Stock 1 has a 1% return and Stock 2 has a 2% return. Therefore the dollar values are now [0.5(1+0.01) 0.5(1+0.02)] = [0.505 0.51]. The total portfolio value is 0.505+0.51 = 1.015 dollars.
Since the portfolio was worth 1.0 on Day 0 and is worth 1.015 On Day 1, the portfolio return is 1.5% on Day 1.
Assume Stock 1 has a 2% return and Stock 2 has a 3% return. The dollar value of the stocks are now [0.505(1+0.02) 0.51(1+0.03)] = [0.5151 0.5253]. The total portfolio is now worth 0.5151+0.5253 = 1.0404 dollars compared to 1.015 the day before
Therefore the portfolio return on Day 2 is -1+1.0404/1.015 = 2.5025%
The month to date portfolio return is -1+1.0404/1.0 = 4.04%
We continue like this until the end of the month. The portfolio weights may be changing but I did not even bother to compute them since I am doing everything in terms of dollar amounts. If you want, you should be able from the above numbers to compute weights (for example when the dollar amounts are [0.5151 0.5253] the weights are [0.495098 0.504902] but these numbers are useless for my calculations).
After computing the return on the last day of the month, we have to do the rebalance. We can think of this as the sale of the entire portfolio for cash and the reinvestment of the cash according to the new weights. Let's say the new weights are [0.5 0.5] again (they could also be [0.3333 0.3333 0.3333] if there are now 3 stocks in the portfolio instead of 2 for example. The entire portfolio gets rebuilt on a rebalance date).
The portfolio is now worth 1.0404 so the repartition (is that a word in English?) on January 31 gives the following dollar amounts: [0.5202 0.5202]
The rebalance is now complete. We are now ready to compute portfolio returns for the first day of February by the same logic as before: the application of daily returns to the dollar values of the stocks.