Yes you should put lotion on a sunburn which can help heal and soothe the sunburn.
When I have a sunburn I always put some moisturizing lotion on the sunburn which helps to keep the sunburn moisturized which helps promote healing of the sunburn and also helps the sunburn feel much better.
I also like to soak in a cool bath to soothe the sunburn as well.
I try to prevent sunburn as much as possible but sometimes you can still get sunburn even if you use sunscreen.
Too much sunburn can sometimes lead to skin cancer so you want to do your best to avoid sunburns as much as possible.
Just avoid putting on any petroleum based ointments which can trap the heat in the sunburn and make the sunburn worse.