Maybe
Using a Bitcoin Profitability Calculator you can find this out by yourself.
This site lists the hashing rate for a GTX 1050 for various algorithms. It doesn't list a hashrate for mining bitcoin, though (our first hint). But even taking the highest hash rate in the table (12.45MH/s) and entering it in the above calculator shows you could expect to mine 3E-9 bitcoins* per month, effectively nothing (and worth nothing).
A GTX 1050 consuming 70W** would consume 50.4KWH of power in that month, assuming a cost $0.1/KWH you would spend $5.04 in electricity, and would have next to no income from it.
As per above, NO, mining bitcoin with a GTX 1050 is not profitable.
What about renting your hashing power?
Using a NiceHash Profitability Calculator you can figure this out by yourself.
For an example, I used the calculator to see how much Bitcoin could be generated by an NVIDIA GTX 1050. It said that that particular graphics has an expected earning 0.00096969 BTC in one month*. At current prices, this is worth $11.10 (all figures in USD)
Using the same figures for power as the previous example of $5.04/month leaves you with a profit of $6.06/month. You're not going to pay back your computer anytime soon with that, but you're not in the red either.
What about other cryptocurrencies?
Also worth mentioning that there are other cryptocurrencies which are more profitable than bitcoin with GPU mining. Here's an article on the Top 12 Best Cryptocurrencies to Mine Using GPUs in 2020.
To Conclude
Mining Bitcoin by yourself is not profitable, but renting out your hash rate could be, and mining other cryptocurrencies could also be profitable. Leaving me with an answer of maybe.
Footnotes
*Note that revenue is based on actually mining a bitcoin. If you mine by yourself you gain either nothing or an entire Bitcoin (and the vast majority of the time you'll get nothing). If you join a large enough pool, the pool has a higher chance of getting the bitcoin than you do on your own and you will be rewarded proportionally to what you contributed to the pool, meaning your earnings will get closer to the expected value stated above. Most miners join pools to have a more stable income, but be aware that pools take a fee in the form of a percentage of your payout.
**This is for the graphics card alone. Your entire computer will be using more. If you have a power meter it might be worth measuring how much power your particular computer consumes when mining bitcoin.