After building a model from historical data to create prediction for example
$\hat{Y}=B_0+B_1X$
and now I want to calculate MSE or $R^2$ value, do I use same data that was used to create the model to calculate errors or do I need another data set with known target values ($Y$ values) that was not used in building the model.
You shouldn't evaluate a model based on the samples it was built on. The goal of such metrics is to emulate how a model would perform in the real world, i.e. unseen data. You can either have two separate datasets, one for training and one for testing or you can use $k$-fold cross validation to not "waste" any data.
For example, let $k=10$ and suppose you have 1000 datapoints. You can partition your dataset into 10 sets of 100 samples, these sets are called folds. You can train 10 models using every 9-fold subset of the 10-folds and use the tenth fold to evaluate each model. For example, one model would be trained with folds 2-10 and tested with fold 1. Another one would be trained with folds 1,3,4,5,..,10 and tested with fold 2 and so on.
From those 10 evaluations, you get a sense of how good your model is for your data and you can get your final model by training it with all 10 folds that is expected to perform close to the average of your 10 evaluations.