By default, querying a lookup field always returns the Id of the lookup record. For instance, Related_Opportunity__r.CustomLookUpField__c will return the record Id of the look up record. If you wish to find other details connected to the lookup record, you need to access those fields in form of dot notation. For example, Related_Opportunity__r....
You can try the below formula. based on your date field you have to use "If" to do null check.
Best resources for building formulas
Will, it allows the fields to be deployed as a formula field?
No, you can't do things in the Metadata API that the UI wouldn't allow. Changing a field from non-formula to formula would cause compilation errors in Apex, Workflow, Flows, etc.
Do we need to create separate formula fields and need to change the references in the environment to deploy the ...
If January 1st is on a Monday, Tuesday, Wednesday or Thursday, that is Week 01.
Based on that, given the week number for the current year, the first date (Monday) of that week is:
CASE(WEEKDAY(DATE(YEAR(TODAY()), 1, 1)),
2, (DATE(YEAR(TODAY()), 1, 1) - 0) + ((Week_Number__c - 1) * 7),
3, (DATE(YEAR(TODAY()), 1, 1) - 1) + ((Week_Number__c - 1) * 7),